diff options
Diffstat (limited to 'demo/crud.ur')
-rw-r--r-- | demo/crud.ur | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/demo/crud.ur b/demo/crud.ur index 72523a9d..21c85d8f 100644 --- a/demo/crud.ur +++ b/demo/crud.ur @@ -1,11 +1,10 @@ -con colMeta = fn t_formT :: (Type * Type) => { - Nam : string, - Show : t_formT.1 -> xbody, - Widget : nm :: Name -> xml form [] [nm = t_formT.2], - WidgetPopulated : nm :: Name -> t_formT.1 -> xml form [] [nm = t_formT.2], - Parse : t_formT.2 -> t_formT.1, - Inject : sql_injectable t_formT.1 - } +con colMeta = fn (db :: Type, widget :: Type) => + {Nam : string, + Show : db -> xbody, + Widget : nm :: Name -> xml form [] [nm = widget], + WidgetPopulated : nm :: Name -> db -> xml form [] [nm = widget], + Parse : widget -> db, + Inject : sql_injectable db} con colsMeta = fn cols :: {(Type * Type)} => $(map colMeta cols) fun default [t] (sh : show t) (rd : read t) (inj : sql_injectable t) |