comparison demo/more/conference.ur @ 1032:5d9f47124c4c

Saving paper decisions
author Adam Chlipala <adamc@hcoop.net>
date Sat, 07 Nov 2009 11:06:38 -0500
parents 6bcc1020d5cd
children
comparison
equal deleted inserted replaced
1031:5dccff15fa62 1032:5d9f47124c4c
13 val paperId_show : show paperId 13 val paperId_show : show paperId
14 val paperId_read : read paperId 14 val paperId_read : read paperId
15 val paperId_eq : eq paperId 15 val paperId_eq : eq paperId
16 table paper : ([Id = paperId, Document = blob] ++ paper) 16 table paper : ([Id = paperId, Document = blob] ++ paper)
17 PRIMARY KEY Id 17 PRIMARY KEY Id
18
19 con review :: {Type}
20 constraint [Paper, User] ~ review
21 table review : ([Paper = paperId, User = userId] ++ review)
22 PRIMARY KEY (Paper, User)
18 23
19 val checkLogin : transaction (option {Id : userId, Nam : string, Chair : bool, OnPc : bool}) 24 val checkLogin : transaction (option {Id : userId, Nam : string, Chair : bool, OnPc : bool})
20 val getLogin : transaction {Id : userId, Nam : string, Chair : bool, OnPc : bool} 25 val getLogin : transaction {Id : userId, Nam : string, Chair : bool, OnPc : bool}
21 val getPcLogin : transaction {Id : userId, Nam : string, Chair : bool} 26 val getPcLogin : transaction {Id : userId, Nam : string, Chair : bool}
22 val checkChair : transaction unit 27 val checkChair : transaction unit
61 66
62 val submissionDeadline : time 67 val submissionDeadline : time
63 val summarizePaper : ctx ::: {Unit} -> [[Body] ~ ctx] => $(map fst paper ++ paperPrivate) 68 val summarizePaper : ctx ::: {Unit} -> [[Body] ~ ctx] => $(map fst paper ++ paperPrivate)
64 -> xml ([Body] ++ ctx) [] [] 69 -> xml ([Body] ++ ctx) [] []
65 70
66 functor Make (M : INPUT where con paper = map fst paper ++ paperPrivate) 71 functor Make (M : INPUT where con paper = map fst paper ++ paperPrivate
72 where con review = map fst review)
67 : OUTPUT where con paper = map fst paper ++ paperPrivate 73 : OUTPUT where con paper = map fst paper ++ paperPrivate
68 where con userId = M.userId 74 where con userId = M.userId
69 where con paperId = M.paperId 75 where con paperId = M.paperId
70 end) = struct 76 end) = struct
71 77
124 error <xml>You are not a chair.</xml> 130 error <xml>You are not a chair.</xml>
125 131
126 structure O = M.Make(struct 132 structure O = M.Make(struct
127 val user = user 133 val user = user
128 val paper = paper 134 val paper = paper
135 val review = review
129 val checkLogin = checkLogin 136 val checkLogin = checkLogin
130 val getLogin = getLogin 137 val getLogin = getLogin
131 val getPcLogin = getPcLogin 138 val getPcLogin = getPcLogin
132 val checkChair = checkChair 139 val checkChair = checkChair
133 val summarizePaper = @@M.summarizePaper 140 val summarizePaper = @@M.summarizePaper