adamc@339: con colMeta = fn t_formT :: (Type * Type) => { adamc@339: Nam : string, adamc@339: Show : t_formT.1 -> xbody, adamc@339: Widget : nm :: Name -> xml form [] [nm = t_formT.2], adamc@341: WidgetPopulated : nm :: Name -> t_formT.1 -> xml form [] [nm = t_formT.2], adamc@339: Parse : t_formT.2 -> t_formT.1, adamc@339: Inject : sql_injectable t_formT.1 adamc@339: } adamc@346: con colsMeta = fn cols :: {(Type * Type)} => $(mapT2T colMeta cols) adamc@326: adamc@325: functor Make(M : sig adamc@339: con cols :: {(Type * Type)} adamc@325: constraint [Id] ~ cols adamc@339: val tab : sql_table ([Id = int] ++ mapT2T fstTT cols) adamc@325: adamc@325: val title : string adamc@325: adamc@339: val cols : colsMeta cols adamc@325: end) : sig adamc@325: val main : unit -> transaction page adamc@325: end