Mercurial > urweb
annotate demo/more/conference.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 | 1d456a06ea4e |
children | 61c30f0742d7 |
rev | line source |
---|---|
adamc@1001 | 1 con reviewMeta = fn (db :: Type, widget :: Type) => |
adamc@1001 | 2 {Show : db -> xbody, |
adamc@1001 | 3 Widget : nm :: Name -> xml form [] [nm = widget], |
adamc@1001 | 4 WidgetPopulated : nm :: Name -> db -> xml form [] [nm = widget], |
adamc@1001 | 5 Parse : widget -> db, |
adamc@1001 | 6 Inject : sql_injectable db} |
adamc@1001 | 7 |
adamc@1001 | 8 val int : reviewMeta (int, string) |
adamc@1001 | 9 val float : reviewMeta (float, string) |
adamc@1001 | 10 val string : reviewMeta (string, string) |
adamc@1001 | 11 val bool : reviewMeta (bool, bool) |
adamc@1001 | 12 |
adamc@1001 | 13 functor Make(M : sig |
adamc@1001 | 14 con review :: {(Type * Type)} |
adamc@1001 | 15 val review : $(map reviewMeta review) |
adamc@1001 | 16 end) : sig |
adamc@1001 | 17 |
adamc@1001 | 18 val main : unit -> transaction page |
adamc@1001 | 19 |
adamc@1001 | 20 end |