annotate demo/crud.urs @ 583:1fd4c041634e

Reactive computation with more base types and records
author Adam Chlipala <adamc@hcoop.net>
date Thu, 01 Jan 2009 10:18:20 -0500
parents 0767d7ad0c3a
children d64533157f40
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@421 9 con colsMeta = fn cols :: {(Type * Type)} => $(mapT2T 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@421 19 val tab : sql_table ([Id = int] ++ mapT2T fstTT cols)
adamc@421 20
adamc@421 21 val title : string
adamc@421 22
adamc@421 23 val cols : colsMeta cols
adamc@421 24 end) : sig
adamc@421 25 val main : unit -> transaction page
adamc@421 26 end