diff options
author | 2010-03-06 16:15:26 -0500 | |
---|---|---|
committer | 2010-03-06 16:15:26 -0500 | |
commit | 049d85f6ec161c8df0461550549ded12be9e44e8 (patch) | |
tree | b422a4c17510b07702c1e16492d87680928a517f /lib/ur/mem.urs | |
parent | e59684b553e4e30e7290c7a589cdb582e8f46907 (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.urs | 13 |
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 |