diff src/cjrize.sml @ 2211:ef766ef6e242

Merge.
author Ziv Scully <ziv@mit.edu>
date Sat, 13 Sep 2014 19:16:07 -0400
parents a9159911c3ba
children 278e10629ba1
line wrap: on
line diff
--- a/src/cjrize.sml	Sat May 31 22:23:25 2014 -0400
+++ b/src/cjrize.sml	Sat Sep 13 19:16:07 2014 -0400
@@ -242,7 +242,7 @@
     let
         fun fail msg =
             (ErrorMsg.errorAt loc msg;
-             ((L'.EPrim (Prim.String ""), loc), sm))
+             ((L'.EPrim (Prim.String (Prim.Normal, "")), loc), sm))
     in
         case e of
             L.EPrim p => ((L'.EPrim p, loc), sm)
@@ -632,7 +632,7 @@
             fun flatten e =
                 case #1 e of
                     L.ERecord [] => []
-                  | L.ERecord [(x, (L.EPrim (Prim.String v), _), _)] => [(x, v)]
+                  | L.ERecord [(x, (L.EPrim (Prim.String (_, v)), _), _)] => [(x, v)]
                   | L.EStrcat (e1, e2) => flatten e1 @ flatten e2
                   | _ => (ErrorMsg.errorAt loc "Constraint has not been fully determined";
                           Print.prefaces "Undetermined constraint"
@@ -640,7 +640,7 @@
                           [])
 
             val pe = case #1 pe of
-                         L.EPrim (Prim.String s) => s
+                         L.EPrim (Prim.String (_, s)) => s
                        | _ => (ErrorMsg.errorAt loc "Primary key has not been fully determined";
                                Print.prefaces "Undetermined constraint"
                                               [("e", MonoPrint.p_exp MonoEnv.empty pe)];
@@ -662,7 +662,7 @@
             fun flatten e =
                 case #1 e of
                     L.ERecord [] => []
-                  | L.ERecord [(x, (L.EPrim (Prim.String v), _), _)] => [(x, v)]
+                  | L.ERecord [(x, (L.EPrim (Prim.String (_, v)), _), _)] => [(x, v)]
                   | L.EStrcat (e1, e2) => flatten e1 @ flatten e2
                   | _ => (ErrorMsg.errorAt loc "Constraint has not been fully determined";
                           Print.prefaces "Undetermined constraint"
@@ -670,7 +670,7 @@
                           [])
 
             val e = case #1 e of
-                        L.EPrim (Prim.String s) => s
+                        L.EPrim (Prim.String (_, s)) => s
                       | _ => (ErrorMsg.errorAt loc "VIEW query has not been fully determined";
                               Print.prefaces "Undetermined VIEW query"
                                              [("e", MonoPrint.p_exp MonoEnv.empty e)];
@@ -730,12 +730,14 @@
                                           end)
                                       ([], [], [], Sm.empty) ds
 
-        val sideInfo = foldl (fn ((n, mode), mp) => IM.insert (mp, n, mode)) IM.empty sideInfo
+        val sideInfo = foldl (fn ((n, mode, dbmode), mp) => IM.insert (mp, n, (mode, dbmode))) IM.empty sideInfo
 
         val ps = map (fn (ek, s, n, ts, t, _, b) =>
-                         (ek, s, n, ts, t,
-                          getOpt (IM.find (sideInfo, n), L'.ServerOnly),
-                          b)) ps
+                         let
+                             val (side, db) = getOpt (IM.find (sideInfo, n), (L'.ServerOnly, L'.AnyDb))
+                         in
+                             (ek, s, n, ts, t, side, db, b)
+                         end) ps
     in
         (List.revAppend (dsF, rev ds),
          ps)