summaryrefslogtreecommitdiff
path: root/lib/ur/mem.urs
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-03-06 16:15:26 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-03-06 16:15:26 -0500
commit6f22b8b971cf196d425d5dad67cdf4da9d8f41b5 (patch)
treeb422a4c17510b07702c1e16492d87680928a517f /lib/ur/mem.urs
parentefe9d5a1b86ec354e6503222b309caf930f42adb (diff)
Standard library moduls Incl and Mem; tweaks to Especialize and Unpoly
Diffstat (limited to 'lib/ur/mem.urs')
-rw-r--r--lib/ur/mem.urs13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/ur/mem.urs b/lib/ur/mem.urs
new file mode 100644
index 00000000..78021823
--- /dev/null
+++ b/lib/ur/mem.urs
@@ -0,0 +1,13 @@
+con mem :: K --> Name -> K -> {K} -> Type
+
+val mem : K --> nm :: Name -> t :: K -> r :: {K} -> [[nm] ~ r] => mem nm t ([nm = t] ++ r)
+val mp : K --> K2 --> f :: (K -> K2) -> nm ::: Name -> t ::: K -> r ::: {K} -> mem nm t r -> mem nm (f t) (map f r)
+
+val proj : nm ::: Name -> t ::: Type -> r ::: {Type} -> mem nm t r -> $r -> t
+val replace : nm ::: Name -> t ::: Type -> r ::: {Type} -> mem nm t r -> $r -> t -> $r
+
+val fold : K --> tf :: ({K} -> Type) -> r ::: {K}
+ -> (nm :: Name -> v :: K -> r' :: {K} -> [[nm] ~ r']
+ => mem nm v r -> tf r' -> tf ([nm = v] ++ r'))
+ -> tf []
+ -> folder r -> tf r