summaryrefslogtreecommitdiff
path: root/demo/more/dbgrid.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-26 11:56:40 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-26 11:56:40 -0500
commit2ace64baba707b2e76778c74789735263eb50823 (patch)
treeb4c6e798738335ded8d209afc369885664396d08 /demo/more/dbgrid.ur
parent7aa1234891f8831449a573ec067348c89c22692f (diff)
Make summary unification more conservative; infer implicit arguments after applications
Diffstat (limited to 'demo/more/dbgrid.ur')
-rw-r--r--demo/more/dbgrid.ur34
1 files changed, 17 insertions, 17 deletions
diff --git a/demo/more/dbgrid.ur b/demo/more/dbgrid.ur
index fe77f21b..b6cd94ae 100644
--- a/demo/more/dbgrid.ur
+++ b/demo/more/dbgrid.ur
@@ -384,31 +384,31 @@ functor Make(M : sig
val wholeRow = @Folder.concat ! M.keyFolder M.rowFolder
fun ensql [env] (r : $(M.key ++ M.row)) =
- map2 [rawMeta] [id] [sql_exp env [] []]
- (fn [t] meta v => @sql_inject meta.Inj v)
- [_] wholeRow M.raw r
+ @map2 [rawMeta] [id] [sql_exp env [] []]
+ (fn [t] meta v => @sql_inject meta.Inj v)
+ wholeRow M.raw r
val new =
- row <- Monad.mapR [rawMeta] [id]
- (fn [nm :: Name] [t :: Type] meta => meta.New)
- [_] wholeRow M.raw;
+ row <- @Monad.mapR _ [rawMeta] [id]
+ (fn [nm :: Name] [t :: Type] meta => meta.New)
+ wholeRow M.raw;
dml (insert M.tab (ensql row));
return row
fun selector (r : $M.key) : sql_exp [T = M.key ++ M.row] [] [] bool =
- foldR2 [rawMeta] [id]
- [fn key => rest :: {Type} -> [rest ~ key] => sql_exp [T = key ++ rest] [] [] bool]
- (fn [nm :: Name] [t :: Type] [key :: {Type}] [[nm] ~ key]
- (meta : rawMeta t) (v : t)
- (exp : rest :: {Type} -> [rest ~ key] => sql_exp [T = key ++ rest] [] [] bool)
- [rest :: {Type}] [rest ~ [nm = t] ++ key] =>
- (WHERE T.{nm} = {@sql_inject meta.Inj v} AND {exp [[nm = t] ++ rest] !}))
- (fn [rest :: {Type}] [rest ~ []] => (WHERE TRUE))
- [_] M.keyFolder (M.raw --- map rawMeta M.row) r
- [_] !
+ @foldR2 [rawMeta] [id]
+ [fn key => rest :: {Type} -> [rest ~ key] => sql_exp [T = key ++ rest] [] [] bool]
+ (fn [nm :: Name] [t :: Type] [key :: {Type}] [[nm] ~ key]
+ (meta : rawMeta t) (v : t)
+ (exp : rest :: {Type} -> [rest ~ key] => sql_exp [T = key ++ rest] [] [] bool)
+ [rest :: {Type}] [rest ~ [nm = t] ++ key] =>
+ (WHERE T.{nm} = {@sql_inject meta.Inj v} AND {exp [[nm = t] ++ rest] !}))
+ (fn [rest :: {Type}] [rest ~ []] => (WHERE TRUE))
+ M.keyFolder (M.raw --- map rawMeta M.row) r
+ [_] !
fun save key row =
- dml (update [M.key ++ M.row] !
+ dml (update [M.key ++ M.row]
(ensql row)
M.tab
(selector key))