annotate 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
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@1023 15 table paper : ([Id = paperId, Document = blob] ++ paper)
adamc@1022 16 PRIMARY KEY Id
adamc@1022 17
adamc@1022 18 val checkLogin : transaction (option {Id : userId, Nam : string, Chair : bool, OnPc : bool})
adamc@1022 19 val getLogin : transaction {Id : userId, Nam : string, Chair : bool, OnPc : bool}
adamc@1023 20 val getPcLogin : transaction {Id : userId, Nam : string, Chair : bool}
adamc@1023 21 val summarizePaper : ctx ::: {Unit} -> [[Body] ~ ctx] => $paper -> xml ([Body] ++ ctx) [] []
adamc@1022 22 end
adamc@1022 23
adamc@1022 24 signature OUTPUT = sig
adamc@1023 25 con paper :: {Type}
adamc@1022 26 type userId
adamc@1022 27 type paperId
adamc@1022 28
adamc@1022 29 val linksForPc : xbody
adamc@1022 30
adamc@1022 31 con yourPaperTables :: {{Type}}
adamc@1022 32 constraint [Paper] ~ yourPaperTables
adamc@1022 33 val joinYourPaper : tabs ::: {{Type}} -> paper ::: {Type}
adamc@1022 34 -> [[Paper] ~ tabs] => [[Paper] ~ yourPaperTables] => [tabs ~ yourPaperTables] => [[Id] ~ paper] =>
adamc@1022 35 sql_from_items ([Paper = [Id = paperId] ++ paper] ++ tabs)
adamc@1022 36 -> sql_from_items (yourPaperTables ++ [Paper = [Id = paperId] ++ paper] ++ tabs)
adamc@1022 37 end
adamc@1022 38
adamc@1001 39 functor Make(M : sig
adamc@1003 40 con paper :: {(Type * Type)}
adamc@1010 41 constraint [Id, Document, Authors] ~ paper
adamc@1004 42 val paper : $(map Meta.meta paper)
adamc@1007 43 val paperFolder : folder paper
adamc@1003 44
adamc@1001 45 con review :: {(Type * Type)}
adamc@1003 46 constraint [Paper, User] ~ review
adamc@1004 47 val review : $(map Meta.meta review)
adamc@1011 48 val reviewFolder : folder review
adamc@1006 49
adamc@1006 50 val submissionDeadline : time
adamc@1023 51 val summarizePaper : ctx ::: {Unit} -> [[Body] ~ ctx] => $(map fst paper) -> xml ([Body] ++ ctx) [] []
adamc@1022 52
adamc@1023 53 functor Make (M : INPUT where con paper = map fst paper)
adamc@1023 54 : OUTPUT where con paper = map fst paper
adamc@1023 55 where con userId = M.userId
adamc@1022 56 where con paperId = M.paperId
adamc@1001 57 end) : sig
adamc@1001 58
adamc@1001 59 val main : unit -> transaction page
adamc@1001 60
adamc@1001 61 end