annotate demo/more/conference.urs @ 1028:8b7971e74335

Preload current assignment status
author Adam Chlipala <adamc@hcoop.net>
date Mon, 02 Nov 2009 14:14:32 -0500
parents be1aec7333a5
children 6bcc1020d5cd
rev   line source
adamc@1022 1 signature INPUT = sig
adamc@1023 2 con paper :: {Type}
adamc@1022 3 constraint [Id, Document] ~ paper
adamc@1022 4
adamc@1022 5 type userId
adamc@1022 6 val userId_inj : sql_injectable_prim userId
adamc@1022 7 table user : {Id : userId, Nam : string, Password : string, Chair : bool, OnPc : bool}
adamc@1022 8 PRIMARY KEY Id,
adamc@1022 9 CONSTRAINT Nam UNIQUE Nam
adamc@1022 10
adamc@1022 11 type paperId
adamc@1022 12 val paperId_inj : sql_injectable_prim paperId
adamc@1023 13 val paperId_show : show paperId
adamc@1023 14 val paperId_read : read paperId
adamc@1025 15 val paperId_eq : eq paperId
adamc@1023 16 table paper : ([Id = paperId, Document = blob] ++ paper)
adamc@1022 17 PRIMARY KEY Id
adamc@1022 18
adamc@1022 19 val checkLogin : transaction (option {Id : userId, Nam : string, Chair : bool, OnPc : bool})
adamc@1022 20 val getLogin : transaction {Id : userId, Nam : string, Chair : bool, OnPc : bool}
adamc@1023 21 val getPcLogin : transaction {Id : userId, Nam : string, Chair : bool}
adamc@1025 22 val checkChair : transaction unit
adamc@1023 23 val summarizePaper : ctx ::: {Unit} -> [[Body] ~ ctx] => $paper -> xml ([Body] ++ ctx) [] []
adamc@1022 24 end
adamc@1022 25
adamc@1022 26 signature OUTPUT = sig
adamc@1023 27 con paper :: {Type}
adamc@1022 28 type userId
adamc@1022 29 type paperId
adamc@1022 30
adamc@1022 31 val linksForPc : xbody
adamc@1025 32 val linksForChair : xbody
adamc@1022 33
adamc@1022 34 con yourPaperTables :: {{Type}}
adamc@1022 35 constraint [Paper] ~ yourPaperTables
adamc@1022 36 val joinYourPaper : tabs ::: {{Type}} -> paper ::: {Type}
adamc@1022 37 -> [[Paper] ~ tabs] => [[Paper] ~ yourPaperTables] => [tabs ~ yourPaperTables] => [[Id] ~ paper] =>
adamc@1027 38 userId (* Current user *)
adamc@1027 39 -> sql_from_items ([Paper = [Id = paperId] ++ paper] ++ tabs)
adamc@1022 40 -> sql_from_items (yourPaperTables ++ [Paper = [Id = paperId] ++ paper] ++ tabs)
adamc@1022 41 end
adamc@1022 42
adamc@1001 43 functor Make(M : sig
adamc@1003 44 con paper :: {(Type * Type)}
adamc@1010 45 constraint [Id, Document, Authors] ~ paper
adamc@1004 46 val paper : $(map Meta.meta paper)
adamc@1007 47 val paperFolder : folder paper
adamc@1003 48
adamc@1001 49 con review :: {(Type * Type)}
adamc@1003 50 constraint [Paper, User] ~ review
adamc@1004 51 val review : $(map Meta.meta review)
adamc@1011 52 val reviewFolder : folder review
adamc@1006 53
adamc@1006 54 val submissionDeadline : time
adamc@1023 55 val summarizePaper : ctx ::: {Unit} -> [[Body] ~ ctx] => $(map fst paper) -> xml ([Body] ++ ctx) [] []
adamc@1022 56
adamc@1023 57 functor Make (M : INPUT where con paper = map fst paper)
adamc@1023 58 : OUTPUT where con paper = map fst paper
adamc@1023 59 where con userId = M.userId
adamc@1022 60 where con paperId = M.paperId
adamc@1001 61 end) : sig
adamc@1001 62
adamc@1001 63 val main : unit -> transaction page
adamc@1001 64
adamc@1001 65 end