val decision = {Nam = "Decision", Initialize = None, Show = fn bo => cdata (case bo of None => "?" | Some True => "Accept" | Some False => "Reject"), Inject = _} functor Make(M : sig con paperOther :: {Type} constraint [Id, Decision] ~ paperOther include Conference.INPUT where con paper = [Decision = option bool] ++ paperOther val status : ctx ::: {Unit} -> [[Body] ~ ctx] => $([Id = paperId] ++ paperOther) -> transaction (xml ([Body] ++ ctx) [] []) end) = struct open M val linksForChair = let fun makeDecisions () = ps <- queryX' (SELECT paper.Id, paper.Decision, paper.{{M.paperOther}} FROM paper ORDER BY paper.Id) (fn r => st <- status (r.Paper -- #Decision); return {useMore (summarizePaper (r.Paper -- #Id))} {useMore st} ); return

Make acceptance decisions

{ps}
Paper Status Decision
and saveDecisions r = List.app (fn {Paper = pid, Decision = dec} => dml (UPDATE paper SET Decision = {[case dec of "?" => None | "Accept" => Some True | "Reject" => Some False | _ => error Invalid decision code]} WHERE Id = {[readError pid]})) r.Papers; makeDecisions () in
  • Make acceptance decisions
  • end val linksForPc = con yourPaperTables = [] constraint [Paper] ~ yourPaperTables fun joinYourPaper [tabs] [paper] [[Paper] ~ tabs] [[Paper] ~ _] [tabs ~ yourPaperTables] [[Id] ~ paper] uid (fi : sql_from_items ([Paper = [Id = paperId] ++ paper] ++ tabs)) = fi end