Mercurial > urweb
comparison demo/batchFun.urs @ 650:fcf0bd3d1667
BatchG demo
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 10 Mar 2009 16:38:38 -0400 |
parents | |
children | 1fb318c17546 |
comparison
equal
deleted
inserted
replaced
649:96ebc6bdb5a0 | 650:fcf0bd3d1667 |
---|---|
1 con colMeta = fn t_state :: (Type * Type) => | |
2 {Nam : string, | |
3 Show : t_state.1 -> xbody, | |
4 Inject : sql_injectable t_state.1, | |
5 | |
6 NewState : transaction t_state.2, | |
7 Widget : t_state.2 -> xbody, | |
8 ReadState : t_state.2 -> transaction t_state.1} | |
9 con colsMeta = fn cols :: {(Type * Type)} => $(map colMeta cols) | |
10 | |
11 val int : string -> colMeta (int, source string) | |
12 val float : string -> colMeta (float, source string) | |
13 val string : string -> colMeta (string, source string) | |
14 | |
15 functor Make(M : sig | |
16 con cols :: {(Type * Type)} | |
17 constraint [Id] ~ cols | |
18 val fl : folder cols | |
19 | |
20 val tab : sql_table ([Id = int] ++ map fst cols) | |
21 | |
22 val title : string | |
23 | |
24 val cols : colsMeta cols | |
25 end) : sig | |
26 val main : unit -> transaction page | |
27 end |