summaryrefslogtreecommitdiff
path: root/demo/crud.urs
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-10-20 10:29:17 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-10-20 10:29:17 -0400
commitb3cfaa74a148d81d3c4a5dcc40b5ae3532b371ea (patch)
tree735539d263808b9d6d33d87eef8e4ea98f3b0e39 /demo/crud.urs
parentaece9fdadf1bdfbf069cc5ac5ab397eef1e3f2ad (diff)
Adapted existing demos to tuple pattern-matching
Diffstat (limited to 'demo/crud.urs')
-rw-r--r--demo/crud.urs13
1 files changed, 6 insertions, 7 deletions
diff --git a/demo/crud.urs b/demo/crud.urs
index 9b1055b2..3690d31e 100644
--- a/demo/crud.urs
+++ b/demo/crud.urs
@@ -1,11 +1,10 @@
-con colMeta = fn t_formT :: (Type * Type) =>
+con colMeta = fn (db :: Type, widget :: 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}
+ 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)
val int : string -> colMeta (int, string)