comparison demo/crud.urs @ 1002:bb3fc575cfe7

Adapted existing demos to tuple pattern-matching
author Adam Chlipala <adamc@hcoop.net>
date Tue, 20 Oct 2009 10:29:17 -0400
parents 1fb318c17546
children
comparison
equal deleted inserted replaced
1001:1d456a06ea4e 1002:bb3fc575cfe7
1 con colMeta = fn t_formT :: (Type * Type) => 1 con colMeta = fn (db :: Type, widget :: Type) =>
2 {Nam : string, 2 {Nam : string,
3 Show : t_formT.1 -> xbody, 3 Show : db -> xbody,
4 Widget : nm :: Name -> xml form [] [nm = t_formT.2], 4 Widget : nm :: Name -> xml form [] [nm = widget],
5 WidgetPopulated : nm :: Name -> t_formT.1 5 WidgetPopulated : nm :: Name -> db -> xml form [] [nm = widget],
6 -> xml form [] [nm = t_formT.2], 6 Parse : widget -> db,
7 Parse : t_formT.2 -> t_formT.1, 7 Inject : sql_injectable db}
8 Inject : sql_injectable t_formT.1}
9 con colsMeta = fn cols :: {(Type * Type)} => $(map colMeta cols) 8 con colsMeta = fn cols :: {(Type * Type)} => $(map colMeta cols)
10 9
11 val int : string -> colMeta (int, string) 10 val int : string -> colMeta (int, string)
12 val float : string -> colMeta (float, string) 11 val float : string -> colMeta (float, string)
13 val string : string -> colMeta (string, string) 12 val string : string -> colMeta (string, string)