annotate tests/crud.urs @ 350:3a1e36b14105

First sort-of-working run of urweb-mode
author Adam Chlipala <adamc@hcoop.net>
date Sun, 12 Oct 2008 10:04:17 -0400
parents a94a79820d49
children 2205d5cb416a
rev   line source
adamc@339 1 con colMeta = fn t_formT :: (Type * Type) => {
adamc@339 2 Nam : string,
adamc@339 3 Show : t_formT.1 -> xbody,
adamc@339 4 Widget : nm :: Name -> xml form [] [nm = t_formT.2],
adamc@341 5 WidgetPopulated : nm :: Name -> t_formT.1 -> xml form [] [nm = t_formT.2],
adamc@339 6 Parse : t_formT.2 -> t_formT.1,
adamc@339 7 Inject : sql_injectable t_formT.1
adamc@339 8 }
adamc@346 9 con colsMeta = fn cols :: {(Type * Type)} => $(mapT2T colMeta cols)
adamc@326 10
adamc@325 11 functor Make(M : sig
adamc@339 12 con cols :: {(Type * Type)}
adamc@325 13 constraint [Id] ~ cols
adamc@339 14 val tab : sql_table ([Id = int] ++ mapT2T fstTT cols)
adamc@325 15
adamc@325 16 val title : string
adamc@325 17
adamc@339 18 val cols : colsMeta cols
adamc@325 19 end) : sig
adamc@325 20 val main : unit -> transaction page
adamc@325 21 end