annotate demo/more/grid.urs @ 915:5e8b6fa5b48f

Start 'more' demo with dbgrid
author Adam Chlipala <adamc@hcoop.net>
date Tue, 08 Sep 2009 07:48:57 -0400
parents
children 2422360c78a3
rev   line source
adamc@915 1 con colMeta' = fn (row :: Type) (t :: Type) =>
adamc@915 2 {Header : string,
adamc@915 3 Project : row -> transaction t,
adamc@915 4 Update : row -> t -> transaction row,
adamc@915 5 Display : t -> xbody,
adamc@915 6 Edit : t -> xbody,
adamc@915 7 Validate : t -> signal bool}
adamc@915 8
adamc@915 9 con colMeta = fn (row :: Type) (global_t :: (Type * Type)) =>
adamc@915 10 {Initialize : transaction global_t.1,
adamc@915 11 Handlers : global_t.1 -> colMeta' row global_t.2}
adamc@915 12
adamc@915 13 functor Make(M : sig
adamc@915 14 type row
adamc@915 15 val list : transaction (list row)
adamc@915 16 val new : transaction row
adamc@915 17 val save : {Old : row, New : row} -> transaction unit
adamc@915 18 val delete : row -> transaction unit
adamc@915 19
adamc@915 20 con cols :: {(Type * Type)}
adamc@915 21 val cols : $(map (colMeta row) cols)
adamc@915 22
adamc@915 23 val folder : folder cols
adamc@915 24 end) : sig
adamc@915 25 type grid
adamc@915 26
adamc@915 27 val grid : transaction grid
adamc@915 28 val sync : grid -> transaction unit
adamc@915 29 val render : grid -> xbody
adamc@915 30
adamc@915 31 style tabl
adamc@915 32 style tr
adamc@915 33 style th
adamc@915 34 style td
adamc@915 35 end