Mercurial > urweb
view 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 |
line wrap: on
line source
con reviewMeta = fn (db :: Type, widget :: Type) => {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} val int : reviewMeta (int, string) val float : reviewMeta (float, string) val string : reviewMeta (string, string) val bool : reviewMeta (bool, bool) functor Make(M : sig con review :: {(Type * Type)} val review : $(map reviewMeta review) end) : sig val main : unit -> transaction page end