comparison lib/ur/top.urs @ 653:e5894f0e541a

Change location/type of [fold] to be more uniform w.r.t. derived folders
author Adam Chlipala <adamc@hcoop.net>
date Thu, 12 Mar 2009 10:26:04 -0400
parents fcf0bd3d1667
children 5bbb542243e8
comparison
equal deleted inserted replaced
652:9db6880184d0 653:e5894f0e541a
1 (** Row folding *) 1 (** Row folding *)
2 2
3 con folder :: K --> {K} -> Type 3 con folder :: K --> {K} -> Type
4 4
5 val fold : K --> tf :: ({K} -> Type)
6 -> (nm :: Name -> v :: K -> r :: {K} -> [[nm] ~ r] =>
7 tf r -> tf ([nm = v] ++ r))
8 -> tf []
9 -> r :: {K} -> folder r -> tf r
10
5 structure Folder : sig 11 structure Folder : sig
6 val fold : K --> r :: {K} -> folder r
7 -> tf :: ({K} -> Type)
8 -> (nm :: Name -> v :: K -> r :: {K} -> tf r
9 -> [[nm] ~ r] => tf ([nm = v] ++ r))
10 -> tf [] -> tf r
11
12 val nil : K --> folder (([]) :: {K}) 12 val nil : K --> folder (([]) :: {K})
13 val cons : K --> r ::: {K} -> nm :: Name -> v :: K 13 val cons : K --> r ::: {K} -> nm :: Name -> v :: K
14 -> [[nm] ~ r] => folder r -> folder ([nm = v] ++ r) 14 -> [[nm] ~ r] => folder r -> folder ([nm = v] ++ r)
15 val concat : K --> r1 ::: {K} -> r2 ::: {K} 15 val concat : K --> r1 ::: {K} -> r2 ::: {K}
16 -> [r1 ~ r2] => folder r1 -> folder r2 -> folder (r1 ++ r2) 16 -> [r1 ~ r2] => folder r1 -> folder r2 -> folder (r1 ++ r2)