annotate demo/crud.urs @ 932:0a156bbd205f

Full Grid1 compiles, thanks to avoiding code size blow-up in mono_reduce
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Sep 2009 13:25:09 -0400
parents 1fb318c17546
children bb3fc575cfe7
rev   line source
adamc@421 1 con colMeta = fn t_formT :: (Type * Type) =>
adamc@421 2 {Nam : string,
adamc@421 3 Show : t_formT.1 -> xbody,
adamc@421 4 Widget : nm :: Name -> xml form [] [nm = t_formT.2],
adamc@421 5 WidgetPopulated : nm :: Name -> t_formT.1
adamc@421 6 -> xml form [] [nm = t_formT.2],
adamc@421 7 Parse : t_formT.2 -> t_formT.1,
adamc@421 8 Inject : sql_injectable t_formT.1}
adamc@622 9 con colsMeta = fn cols :: {(Type * Type)} => $(map colMeta cols)
adamc@421 10
adamc@421 11 val int : string -> colMeta (int, string)
adamc@421 12 val float : string -> colMeta (float, string)
adamc@421 13 val string : string -> colMeta (string, string)
adamc@421 14 val bool : string -> colMeta (bool, bool)
adamc@421 15
adamc@421 16 functor Make(M : sig
adamc@421 17 con cols :: {(Type * Type)}
adamc@421 18 constraint [Id] ~ cols
adamc@632 19 val fl : folder cols
adamc@632 20
adamc@706 21 table tab : ([Id = int] ++ map fst cols)
adamc@421 22
adamc@421 23 val title : string
adamc@421 24
adamc@421 25 val cols : colsMeta cols
adamc@421 26 end) : sig
adamc@421 27 val main : unit -> transaction page
adamc@421 28 end