comparison demo/more/conference.urs @ 1003:61c30f0742d7

Registering for Conference1
author Adam Chlipala <adamc@hcoop.net>
date Tue, 20 Oct 2009 11:05:58 -0400
parents 1d456a06ea4e
children a87495bcaeec
comparison
equal deleted inserted replaced
1002:bb3fc575cfe7 1003:61c30f0742d7
1 con reviewMeta = fn (db :: Type, widget :: Type) => 1 con meta = fn (db :: Type, widget :: Type) =>
2 {Show : db -> xbody, 2 {Show : db -> xbody,
3 Widget : nm :: Name -> xml form [] [nm = widget], 3 Widget : nm :: Name -> xml form [] [nm = widget],
4 WidgetPopulated : nm :: Name -> db -> xml form [] [nm = widget], 4 WidgetPopulated : nm :: Name -> db -> xml form [] [nm = widget],
5 Parse : widget -> db, 5 Parse : widget -> db,
6 Inject : sql_injectable db} 6 Inject : sql_injectable db}
7 7
8 val int : reviewMeta (int, string) 8 val int : meta (int, string)
9 val float : reviewMeta (float, string) 9 val float : meta (float, string)
10 val string : reviewMeta (string, string) 10 val string : meta (string, string)
11 val bool : reviewMeta (bool, bool) 11 val bool : meta (bool, bool)
12 12
13 functor Make(M : sig 13 functor Make(M : sig
14 con paper :: {(Type * Type)}
15 constraint [Id, Title] ~ paper
16 val paper : $(map meta paper)
17
14 con review :: {(Type * Type)} 18 con review :: {(Type * Type)}
15 val review : $(map reviewMeta review) 19 constraint [Paper, User] ~ review
20 val review : $(map meta review)
16 end) : sig 21 end) : sig
17 22
18 val main : unit -> transaction page 23 val main : unit -> transaction page
19 24
20 end 25 end