diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-09-08 07:48:57 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-09-08 07:48:57 -0400 |
commit | 8f032c5cdc1e1efbed9782c37feca90bf9e20ca3 (patch) | |
tree | ecc04e66934cf2a473b64db35c53847eff7c6f24 /demo/more/grid.urs | |
parent | b1f297cea35d2fa47aa8193d3d90ddf8eb98afaa (diff) |
Start 'more' demo with dbgrid
Diffstat (limited to 'demo/more/grid.urs')
-rw-r--r-- | demo/more/grid.urs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/demo/more/grid.urs b/demo/more/grid.urs new file mode 100644 index 00000000..191ec49a --- /dev/null +++ b/demo/more/grid.urs @@ -0,0 +1,35 @@ +con colMeta' = fn (row :: Type) (t :: Type) => + {Header : string, + Project : row -> transaction t, + Update : row -> t -> transaction row, + Display : t -> xbody, + Edit : t -> xbody, + Validate : t -> signal bool} + +con colMeta = fn (row :: Type) (global_t :: (Type * Type)) => + {Initialize : transaction global_t.1, + Handlers : global_t.1 -> colMeta' row global_t.2} + +functor Make(M : sig + type row + val list : transaction (list row) + val new : transaction row + val save : {Old : row, New : row} -> transaction unit + val delete : row -> transaction unit + + con cols :: {(Type * Type)} + val cols : $(map (colMeta row) cols) + + val folder : folder cols + end) : sig + type grid + + val grid : transaction grid + val sync : grid -> transaction unit + val render : grid -> xbody + + style tabl + style tr + style th + style td +end |