Mercurial > urweb
comparison demo/more/grid.urs @ 935:2422360c78a3
Dropped in initial aggregate types
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 15 Sep 2009 09:40:51 -0400 |
parents | 5e8b6fa5b48f |
children | 6966d98c80b5 |
comparison
equal
deleted
inserted
replaced
934:36f787c02287 | 935:2422360c78a3 |
---|---|
8 | 8 |
9 con colMeta = fn (row :: Type) (global_t :: (Type * Type)) => | 9 con colMeta = fn (row :: Type) (global_t :: (Type * Type)) => |
10 {Initialize : transaction global_t.1, | 10 {Initialize : transaction global_t.1, |
11 Handlers : global_t.1 -> colMeta' row global_t.2} | 11 Handlers : global_t.1 -> colMeta' row global_t.2} |
12 | 12 |
13 con aggregateMeta = fn (row :: Type) (acc :: Type) => | |
14 {Initial : acc, | |
15 Step : row -> acc -> acc, | |
16 Display : acc -> xbody} | |
17 | |
13 functor Make(M : sig | 18 functor Make(M : sig |
14 type row | 19 type row |
15 val list : transaction (list row) | 20 val list : transaction (list row) |
16 val new : transaction row | 21 val new : transaction row |
17 val save : {Old : row, New : row} -> transaction unit | 22 val save : {Old : row, New : row} -> transaction unit |
19 | 24 |
20 con cols :: {(Type * Type)} | 25 con cols :: {(Type * Type)} |
21 val cols : $(map (colMeta row) cols) | 26 val cols : $(map (colMeta row) cols) |
22 | 27 |
23 val folder : folder cols | 28 val folder : folder cols |
29 | |
30 con aggregates :: {Type} | |
31 val aggregates : $(map (aggregateMeta row) aggregates) | |
24 end) : sig | 32 end) : sig |
25 type grid | 33 type grid |
26 | 34 |
27 val grid : transaction grid | 35 val grid : transaction grid |
28 val sync : grid -> transaction unit | 36 val sync : grid -> transaction unit |