annotate demo/crud.urs @ 695:500e93aa436f

sleep and better Scriptcheck
author Adam Chlipala <adamc@hcoop.net>
date Sat, 04 Apr 2009 15:56:47 -0400
parents 24fd1edfcaa3
children 1fb318c17546
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@637 21 val tab : sql_table ([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