comparison lib/ur/list.urs @ 1394:d328983dc5a6

Allow subqueries to reference aggregate-only columns of free tables; treat non-COUNT aggregate functions as possibly returning NULL
author Adam Chlipala <adam@chlipala.net>
date Sat, 15 Jan 2011 14:53:13 -0500
parents 9e0fa4f6ac93
children 3061d1bf4b2d
comparison
equal deleted inserted replaced
1393:802c179dac1f 1394:d328983dc5a6
51 val app : m ::: (Type -> Type) -> monad m -> a ::: Type 51 val app : m ::: (Type -> Type) -> monad m -> a ::: Type
52 -> (a -> m unit) -> t a -> m unit 52 -> (a -> m unit) -> t a -> m unit
53 53
54 val mapQuery : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type 54 val mapQuery : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type
55 -> [tables ~ exps] => 55 -> [tables ~ exps] =>
56 sql_query [] tables exps 56 sql_query [] [] tables exps
57 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> t) 57 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> t)
58 -> transaction (list t) 58 -> transaction (list t)
59 59
60 val mapQueryM : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type 60 val mapQueryM : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type
61 -> [tables ~ exps] => 61 -> [tables ~ exps] =>
62 sql_query [] tables exps 62 sql_query [] [] tables exps
63 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> transaction t) 63 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> transaction t)
64 -> transaction (list t) 64 -> transaction (list t)
65 65
66 val mapQueryPartialM : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type 66 val mapQueryPartialM : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type
67 -> [tables ~ exps] => 67 -> [tables ~ exps] =>
68 sql_query [] tables exps 68 sql_query [] [] tables exps
69 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> transaction (option t)) 69 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> transaction (option t))
70 -> transaction (list t) 70 -> transaction (list t)
71 71
72 val sort : a ::: Type -> (a -> a -> bool) (* > predicate *) -> t a -> t a 72 val sort : a ::: Type -> (a -> a -> bool) (* > predicate *) -> t a -> t a
73 73