comparison demo/more/conference.urs @ 1004:a87495bcaeec

Start of user management
author Adam Chlipala <adamc@hcoop.net>
date Tue, 20 Oct 2009 12:48:53 -0400
parents 61c30f0742d7
children 5a0f6ec208ce
comparison
equal deleted inserted replaced
1003:61c30f0742d7 1004:a87495bcaeec
1 con meta = 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 : meta (int, string)
9 val float : meta (float, string)
10 val string : meta (string, string)
11 val bool : meta (bool, bool)
12
13 functor Make(M : sig 1 functor Make(M : sig
14 con paper :: {(Type * Type)} 2 con paper :: {(Type * Type)}
15 constraint [Id, Title] ~ paper 3 constraint [Id, Title] ~ paper
16 val paper : $(map meta paper) 4 val paper : $(map Meta.meta paper)
17 5
18 con review :: {(Type * Type)} 6 con review :: {(Type * Type)}
19 constraint [Paper, User] ~ review 7 constraint [Paper, User] ~ review
20 val review : $(map meta review) 8 val review : $(map Meta.meta review)
21 end) : sig 9 end) : sig
22 10
23 val main : unit -> transaction page 11 val main : unit -> transaction page
24 12
25 end 13 end