Mercurial > urweb
comparison lib/ur/monad.urs @ 905:7a4b026e45dd
Library improvements; proper list [un]urlification; remove server-side ServerCalls; eta reduction in type inference
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 09 Aug 2009 16:13:27 -0400 |
parents | d1d0b18afd3d |
children | 8e540df3294d |
comparison
equal
deleted
inserted
replaced
904:6d9538ce94d8 | 905:7a4b026e45dd |
---|---|
1 val exec : m ::: (Type -> Type) -> monad m -> ts ::: {Type} | 1 val exec : m ::: (Type -> Type) -> monad m -> ts ::: {Type} |
2 -> $(map m ts) -> folder ts -> m $ts | 2 -> $(map m ts) -> folder ts -> m $ts |
3 | 3 |
4 val ignore : m ::: (Type -> Type) -> monad m -> t ::: Type | 4 val ignore : m ::: (Type -> Type) -> monad m -> t ::: Type |
5 -> m t -> m unit | 5 -> m t -> m unit |
6 | |
7 val foldR : K --> m ::: (Type -> Type) -> monad m | |
8 -> tf :: (K -> Type) | |
9 -> tr :: ({K} -> Type) | |
10 -> (nm :: Name -> t :: K -> rest :: {K} | |
11 -> [[nm] ~ rest] => | |
12 tf t -> tr rest -> m (tr ([nm = t] ++ rest))) | |
13 -> tr [] | |
14 -> r :: {K} -> folder r -> $(map tf r) -> m (tr r) | |
15 | |
16 val foldR2 : K --> m ::: (Type -> Type) -> monad m | |
17 -> tf1 :: (K -> Type) -> tf2 :: (K -> Type) | |
18 -> tr :: ({K} -> Type) | |
19 -> (nm :: Name -> t :: K -> rest :: {K} | |
20 -> [[nm] ~ rest] => | |
21 tf1 t -> tf2 t -> tr rest -> m (tr ([nm = t] ++ rest))) | |
22 -> tr [] | |
23 -> r :: {K} -> folder r -> $(map tf1 r) -> $(map tf2 r) -> m (tr r) | |
24 | |
25 val mapR : K --> m ::: (Type -> Type) -> monad m | |
26 -> tf :: (K -> Type) | |
27 -> tr :: (K -> Type) | |
28 -> (nm :: Name -> t :: K -> tf t -> m (tr t)) | |
29 -> r :: {K} -> folder r -> $(map tf r) -> m ($(map tr r)) |