adamc@1004: con meta = fn (db :: Type, widget :: Type) => adamc@1004: {Nam : string, adamc@1004: Show : db -> xbody, adamc@1004: Widget : nm :: Name -> xml form [] [nm = widget], adamc@1004: WidgetPopulated : nm :: Name -> db -> xml form [] [nm = widget], adamc@1004: Parse : widget -> db, adamc@1004: Inject : sql_injectable db} adamc@1004: adamc@1004: val int : string -> meta (int, string) adamc@1004: val float : string -> meta (float, string) adamc@1004: val string : string -> meta (string, string) adamc@1004: val bool : string -> meta (bool, bool) adamc@1007: adamc@1007: val textarea : string -> meta (string, string) adamc@1007: adamc@1009: val allContent : ts ::: {(Type * Type)} -> $(map meta ts) -> $(map fst ts) -> folder ts -> xbody adamc@1009: adamc@1007: val allWidgets : ts ::: {(Type * Type)} -> $(map meta ts) -> folder ts adamc@1007: -> xml form [] (map snd ts) adamc@1008: adamc@1008: val allPopulatedTr : ts ::: {(Type * Type)} -> $(map meta ts) -> $(map fst ts) -> folder ts adamc@1008: -> xml ([Tr] ++ form) [] (map snd ts) adamc@1008: adamc@1008: val ensql : avail ::: {{Type}} -> ts ::: {(Type * Type)} -> $(map meta ts) -> $(map snd ts) -> folder ts adamc@1008: -> $(map (sql_exp avail [] []) (map fst ts))