summaryrefslogtreecommitdiff
path: root/lib/ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-02-24 12:01:24 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-02-24 12:01:24 -0500
commit7b71af9c790abcff2bfe0a16a417a1023776351d (patch)
tree9dd05f2dad9cc6d4e0e33af1e8f1cf0a1def9f15 /lib/ur
parentbb4aed8e1304d5cb3cbe7ec5fdcf95344e9aa2d5 (diff)
Switch to TDisjoint from CDisjoint; still need to implement obligation generation at EDisjoint uses
Diffstat (limited to 'lib/ur')
-rw-r--r--lib/ur/top.ur12
-rw-r--r--lib/ur/top.urs2
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/ur/top.ur b/lib/ur/top.ur
index 5d2ae606..79d30354 100644
--- a/lib/ur/top.ur
+++ b/lib/ur/top.ur
@@ -17,6 +17,18 @@ structure Folder = struct
(f : nm :: Name -> v :: K -> r :: {K} -> tf r
-> fn [[nm] ~ r] => tf ([nm = v] ++ r))
(i : tf []) = f [nm] [v] [r] (fold [tf] f i)
+
+ fun concat K (r1 ::: {K}) (r2 ::: {K}) [r1 ~ r2]
+ (f1 : folder r1) (f2 : folder r2)
+ (tf :: {K} -> Type)
+ (f : nm :: Name -> v :: K -> r :: {K} -> tf r
+ -> fn [[nm] ~ r] => tf ([nm = v] ++ r))
+ (i : tf []) =
+ f1 [fn r1' [r1' ~ r2] => tf (r1' ++ r2)] 0
+ (*(fn (nm :: Name) (v :: K) (r1' :: {K}) (acc : fn [r1' ~ r2] => tf (r1' ++ r2))
+ [[nm] ~ r1'] [[nm = v] ++ r1' ~ r2] =>
+ f [nm] [v] [r1' ++ r2] acc)
+ (f2 [tf] f i)*)
end
diff --git a/lib/ur/top.urs b/lib/ur/top.urs
index d4cd34f4..563f6afd 100644
--- a/lib/ur/top.urs
+++ b/lib/ur/top.urs
@@ -10,6 +10,8 @@ structure Folder : sig
val nil : K --> folder (([]) :: {K})
val cons : K --> r ::: {K} -> nm :: Name -> v :: K
-> fn [[nm] ~ r] => folder r -> folder ([nm = v] ++ r)
+ val concat : K --> r1 ::: {K} -> r2 ::: {K}
+ -> fn [r1 ~ r2] => folder r1 -> folder r2 -> folder (r1 ++ r2)
end