Mercurial > urweb
comparison lib/ur/list.urs @ 1107:52571ca9b777
Eta-expand bodies of transaction functions in Monoization, to enable later optimization
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 31 Dec 2009 18:07:53 -0500 |
parents | eaba663fd6aa |
children | 61c3139eab12 |
comparison
equal
deleted
inserted
replaced
1106:c9137606733a | 1107:52571ca9b777 |
---|---|
25 val mapX : a ::: Type -> ctx ::: {Unit} -> (a -> xml ctx [] []) -> t a -> xml ctx [] [] | 25 val mapX : a ::: Type -> ctx ::: {Unit} -> (a -> xml ctx [] []) -> t a -> xml ctx [] [] |
26 | 26 |
27 val mapM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type | 27 val mapM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type |
28 -> (a -> m b) -> t a -> m (t b) | 28 -> (a -> m b) -> t a -> m (t b) |
29 | 29 |
30 val mapPartialM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type -> (a -> m (option b)) -> t a -> m (t b) | |
31 | |
30 val mapXM : m ::: (Type -> Type) -> monad m -> a ::: Type -> ctx ::: {Unit} | 32 val mapXM : m ::: (Type -> Type) -> monad m -> a ::: Type -> ctx ::: {Unit} |
31 -> (a -> m (xml ctx [] [])) -> t a -> m (xml ctx [] []) | 33 -> (a -> m (xml ctx [] [])) -> t a -> m (xml ctx [] []) |
32 | 34 |
33 val filter : a ::: Type -> (a -> bool) -> t a -> t a | 35 val filter : a ::: Type -> (a -> bool) -> t a -> t a |
34 | 36 |
51 -> [tables ~ exps] => | 53 -> [tables ~ exps] => |
52 sql_query tables exps | 54 sql_query tables exps |
53 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> t) | 55 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> t) |
54 -> transaction (list t) | 56 -> transaction (list t) |
55 | 57 |
58 val mapQueryM : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type | |
59 -> [tables ~ exps] => | |
60 sql_query tables exps | |
61 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> transaction t) | |
62 -> transaction (list t) | |
63 | |
64 val mapQueryPartialM : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type | |
65 -> [tables ~ exps] => | |
66 sql_query tables exps | |
67 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> transaction (option t)) | |
68 -> transaction (list t) | |
69 | |
56 (** Association lists *) | 70 (** Association lists *) |
57 | 71 |
58 val assoc : a ::: Type -> b ::: Type -> eq a -> a -> t (a * b) -> option b | 72 val assoc : a ::: Type -> b ::: Type -> eq a -> a -> t (a * b) -> option b |
59 | 73 |
60 val assocAdd : a ::: Type -> b ::: Type -> eq a -> a -> b -> t (a * b) -> t (a * b) | 74 val assocAdd : a ::: Type -> b ::: Type -> eq a -> a -> b -> t (a * b) -> t (a * b) |