view 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
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