comparison demo/more/conference.urs @ 1027:be1aec7333a5

Saving paper assignments
author Adam Chlipala <adamc@hcoop.net>
date Mon, 02 Nov 2009 14:11:08 -0500
parents 7facf72aaf0a
children 6bcc1020d5cd
comparison
equal deleted inserted replaced
1026:c1f49f6ba856 1027:be1aec7333a5
33 33
34 con yourPaperTables :: {{Type}} 34 con yourPaperTables :: {{Type}}
35 constraint [Paper] ~ yourPaperTables 35 constraint [Paper] ~ yourPaperTables
36 val joinYourPaper : tabs ::: {{Type}} -> paper ::: {Type} 36 val joinYourPaper : tabs ::: {{Type}} -> paper ::: {Type}
37 -> [[Paper] ~ tabs] => [[Paper] ~ yourPaperTables] => [tabs ~ yourPaperTables] => [[Id] ~ paper] => 37 -> [[Paper] ~ tabs] => [[Paper] ~ yourPaperTables] => [tabs ~ yourPaperTables] => [[Id] ~ paper] =>
38 sql_from_items ([Paper = [Id = paperId] ++ paper] ++ tabs) 38 userId (* Current user *)
39 -> sql_from_items ([Paper = [Id = paperId] ++ paper] ++ tabs)
39 -> sql_from_items (yourPaperTables ++ [Paper = [Id = paperId] ++ paper] ++ tabs) 40 -> sql_from_items (yourPaperTables ++ [Paper = [Id = paperId] ++ paper] ++ tabs)
40 end 41 end
41 42
42 functor Make(M : sig 43 functor Make(M : sig
43 con paper :: {(Type * Type)} 44 con paper :: {(Type * Type)}