diff src/elab_env.sml @ 338:e976b187d73a

SQL sequences
author Adam Chlipala <adamc@hcoop.net>
date Sun, 14 Sep 2008 11:02:18 -0400
parents 58f1260f293f
children 389399d65331
line wrap: on
line diff
--- a/src/elab_env.sml	Sat Sep 13 20:15:30 2008 -0400
+++ b/src/elab_env.sml	Sun Sep 14 11:02:18 2008 -0400
@@ -546,6 +546,7 @@
       | SgiStr (x, n, _) => (sgns, IM.insert (strs, n, x), cons)
       | SgiConstraint _ => (sgns, strs, cons)
       | SgiTable _ => (sgns, strs, cons)
+      | SgiSequence _ => (sgns, strs, cons)
       | SgiClassAbs (x, n) => (sgns, strs, IM.insert (cons, n, x))
       | SgiClass (x, n, _) => (sgns, strs, IM.insert (cons, n, x))
 
@@ -835,7 +836,13 @@
 
       | SgiTable (tn, x, n, c) =>
         let
-            val t = (CApp ((CModProj (tn, [], "table"), loc), c), loc)
+            val t = (CApp ((CModProj (tn, [], "sql_table"), loc), c), loc)
+        in
+            pushENamedAs env x n t
+        end
+      | SgiSequence (tn, x, n) =>
+        let
+            val t = (CModProj (tn, [], "sql_sequence"), loc)
         in
             pushENamedAs env x n t
         end
@@ -975,6 +982,7 @@
                   | SgiSgn (x, n, _) => seek (sgis, IM.insert (sgns, n, x), strs, cons, acc)
                   | SgiStr (x, n, _) => seek (sgis, sgns, IM.insert (strs, n, x), cons, acc)
                   | SgiTable _ => seek (sgis, sgns, strs, cons, acc)
+                  | SgiSequence _ => seek (sgis, sgns, strs, cons, acc)
                   | SgiClassAbs (x, n) => seek (sgis, sgns, strs, IM.insert (cons, n, x), acc)
                   | SgiClass (x, n, _) => seek (sgis, sgns, strs, IM.insert (cons, n, x), acc)
     in
@@ -1049,7 +1057,13 @@
       | DExport _ => env
       | DTable (tn, x, n, c) =>
         let
-            val t = (CApp ((CModProj (tn, [], "table"), loc), c), loc)
+            val t = (CApp ((CModProj (tn, [], "sql_table"), loc), c), loc)
+        in
+            pushENamedAs env x n t
+        end
+      | DSequence (tn, x, n) =>
+        let
+            val t = (CModProj (tn, [], "sql_sequence"), loc)
         in
             pushENamedAs env x n t
         end