Mercurial > urweb
comparison demo/more/conference.urs @ 1001:1d456a06ea4e
Add tuple pattern-matching at the constructor level
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 20 Oct 2009 10:19:00 -0400 |
parents | |
children | 61c30f0742d7 |
comparison
equal
deleted
inserted
replaced
1000:5d7e05b4a5c0 | 1001:1d456a06ea4e |
---|---|
1 con reviewMeta = fn (db :: Type, widget :: Type) => | |
2 {Show : db -> xbody, | |
3 Widget : nm :: Name -> xml form [] [nm = widget], | |
4 WidgetPopulated : nm :: Name -> db -> xml form [] [nm = widget], | |
5 Parse : widget -> db, | |
6 Inject : sql_injectable db} | |
7 | |
8 val int : reviewMeta (int, string) | |
9 val float : reviewMeta (float, string) | |
10 val string : reviewMeta (string, string) | |
11 val bool : reviewMeta (bool, bool) | |
12 | |
13 functor Make(M : sig | |
14 con review :: {(Type * Type)} | |
15 val review : $(map reviewMeta review) | |
16 end) : sig | |
17 | |
18 val main : unit -> transaction page | |
19 | |
20 end |