comparison demo/more/conference.urs @ 1023:e46227efcbba

Bidding interface
author Adam Chlipala <adamc@hcoop.net>
date Sun, 01 Nov 2009 10:20:20 -0500
parents 4de35df3d545
children 7facf72aaf0a
comparison
equal deleted inserted replaced
1022:4de35df3d545 1023:e46227efcbba
1 signature INPUT = sig 1 signature INPUT = sig
2 con paper :: {(Type * Type)} 2 con paper :: {Type}
3 constraint [Id, Document] ~ paper 3 constraint [Id, Document] ~ paper
4 4
5 type userId 5 type userId
6 val userId_inj : sql_injectable_prim userId 6 val userId_inj : sql_injectable_prim userId
7 table user : {Id : userId, Nam : string, Password : string, Chair : bool, OnPc : bool} 7 table user : {Id : userId, Nam : string, Password : string, Chair : bool, OnPc : bool}
8 PRIMARY KEY Id, 8 PRIMARY KEY Id,
9 CONSTRAINT Nam UNIQUE Nam 9 CONSTRAINT Nam UNIQUE Nam
10 10
11 type paperId 11 type paperId
12 val paperId_inj : sql_injectable_prim paperId 12 val paperId_inj : sql_injectable_prim paperId
13 table paper : ([Id = paperId, Document = blob] ++ map fst paper) 13 val paperId_show : show paperId
14 val paperId_read : read paperId
15 table paper : ([Id = paperId, Document = blob] ++ paper)
14 PRIMARY KEY Id 16 PRIMARY KEY Id
15 17
16 val checkLogin : transaction (option {Id : userId, Nam : string, Chair : bool, OnPc : bool}) 18 val checkLogin : transaction (option {Id : userId, Nam : string, Chair : bool, OnPc : bool})
17 val getLogin : transaction {Id : userId, Nam : string, Chair : bool, OnPc : bool} 19 val getLogin : transaction {Id : userId, Nam : string, Chair : bool, OnPc : bool}
20 val getPcLogin : transaction {Id : userId, Nam : string, Chair : bool}
21 val summarizePaper : ctx ::: {Unit} -> [[Body] ~ ctx] => $paper -> xml ([Body] ++ ctx) [] []
18 end 22 end
19 23
20 signature OUTPUT = sig 24 signature OUTPUT = sig
25 con paper :: {Type}
21 type userId 26 type userId
22 type paperId 27 type paperId
23 28
24 val linksForPc : xbody 29 val linksForPc : xbody
25 30
41 constraint [Paper, User] ~ review 46 constraint [Paper, User] ~ review
42 val review : $(map Meta.meta review) 47 val review : $(map Meta.meta review)
43 val reviewFolder : folder review 48 val reviewFolder : folder review
44 49
45 val submissionDeadline : time 50 val submissionDeadline : time
46 val summarizePaper : $(map fst paper) -> xbody 51 val summarizePaper : ctx ::: {Unit} -> [[Body] ~ ctx] => $(map fst paper) -> xml ([Body] ++ ctx) [] []
47 52
48 functor Make (M : INPUT where con paper = paper) 53 functor Make (M : INPUT where con paper = map fst paper)
49 : OUTPUT where con userId = M.userId 54 : OUTPUT where con paper = map fst paper
55 where con userId = M.userId
50 where con paperId = M.paperId 56 where con paperId = M.paperId
51 end) : sig 57 end) : sig
52 58
53 val main : unit -> transaction page 59 val main : unit -> transaction page
54 60