annotate demo/more/conference.urs @ 1025:7facf72aaf0a

Initial form for paper assignment
author Adam Chlipala <adamc@hcoop.net>
date Sun, 01 Nov 2009 14:26:20 -0500
parents e46227efcbba
children be1aec7333a5
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@1022 38 sql_from_items ([Paper = [Id = paperId] ++ paper] ++ tabs)
adamc@1022 39 -> sql_from_items (yourPaperTables ++ [Paper = [Id = paperId] ++ paper] ++ tabs)
adamc@1022 40 end
adamc@1022 41
adamc@1001 42 functor Make(M : sig
adamc@1003 43 con paper :: {(Type * Type)}
adamc@1010 44 constraint [Id, Document, Authors] ~ paper
adamc@1004 45 val paper : $(map Meta.meta paper)
adamc@1007 46 val paperFolder : folder paper
adamc@1003 47
adamc@1001 48 con review :: {(Type * Type)}
adamc@1003 49 constraint [Paper, User] ~ review
adamc@1004 50 val review : $(map Meta.meta review)
adamc@1011 51 val reviewFolder : folder review
adamc@1006 52
adamc@1006 53 val submissionDeadline : time
adamc@1023 54 val summarizePaper : ctx ::: {Unit} -> [[Body] ~ ctx] => $(map fst paper) -> xml ([Body] ++ ctx) [] []
adamc@1022 55
adamc@1023 56 functor Make (M : INPUT where con paper = map fst paper)
adamc@1023 57 : OUTPUT where con paper = map fst paper
adamc@1023 58 where con userId = M.userId
adamc@1022 59 where con paperId = M.paperId
adamc@1001 60 end) : sig
adamc@1001 61
adamc@1001 62 val main : unit -> transaction page
adamc@1001 63
adamc@1001 64 end