diff lib/ur/top.urs @ 631:effa7d43aac3

Make folders abstract
author Adam Chlipala <adamc@hcoop.net>
date Tue, 24 Feb 2009 14:04:07 -0500
parents 6a6eb9882d57
children 6c4643880df5
line wrap: on
line diff
--- a/lib/ur/top.urs	Tue Feb 24 13:50:39 2009 -0500
+++ b/lib/ur/top.urs	Tue Feb 24 14:04:07 2009 -0500
@@ -1,12 +1,14 @@
 (** Row folding *)
 
-con folder = K ==> fn r :: {K} =>
-                      tf :: ({K} -> Type)
-                      -> (nm :: Name -> v :: K -> r :: {K} -> tf r
-                          -> [[nm] ~ r] => tf ([nm = v] ++ r))
-                      -> tf [] -> tf r
+con folder :: K --> {K} -> Type
 
 structure Folder : sig
+    val fold : K --> r ::: {K} -> folder r
+               -> tf :: ({K} -> Type)
+               -> (nm :: Name -> v :: K -> r :: {K} -> tf r
+                   -> [[nm] ~ r] => tf ([nm = v] ++ r))
+               -> tf [] -> tf r
+
     val nil : K --> folder (([]) :: {K})
     val cons : K --> r ::: {K} -> nm :: Name -> v :: K
                -> [[nm] ~ r] => folder r -> folder ([nm = v] ++ r)