Mercurial > urweb
comparison lib/ur/mem.urs @ 1180:ac3dbbc85c6e
Standard library moduls Incl and Mem; tweaks to Especialize and Unpoly
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 06 Mar 2010 16:15:26 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1179:c58453683bbb | 1180:ac3dbbc85c6e |
---|---|
1 con mem :: K --> Name -> K -> {K} -> Type | |
2 | |
3 val mem : K --> nm :: Name -> t :: K -> r :: {K} -> [[nm] ~ r] => mem nm t ([nm = t] ++ r) | |
4 val mp : K --> K2 --> f :: (K -> K2) -> nm ::: Name -> t ::: K -> r ::: {K} -> mem nm t r -> mem nm (f t) (map f r) | |
5 | |
6 val proj : nm ::: Name -> t ::: Type -> r ::: {Type} -> mem nm t r -> $r -> t | |
7 val replace : nm ::: Name -> t ::: Type -> r ::: {Type} -> mem nm t r -> $r -> t -> $r | |
8 | |
9 val fold : K --> tf :: ({K} -> Type) -> r ::: {K} | |
10 -> (nm :: Name -> v :: K -> r' :: {K} -> [[nm] ~ r'] | |
11 => mem nm v r -> tf r' -> tf ([nm = v] ++ r')) | |
12 -> tf [] | |
13 -> folder r -> tf r |