diff src/elab_util.sml @ 203:dd82457fda82

Parsing and elaborating 'table'
author Adam Chlipala <adamc@hcoop.net>
date Thu, 14 Aug 2008 13:20:29 -0400
parents ab86aa858e6c
children cb8f69556975
line wrap: on
line diff
--- a/src/elab_util.sml	Tue Aug 12 14:55:05 2008 -0400
+++ b/src/elab_util.sml	Thu Aug 14 13:20:29 2008 -0400
@@ -436,6 +436,10 @@
                             S.map2 (con ctx c2,
                                     fn c2' =>
                                        (SgiConstraint (c1', c2'), loc)))
+              | SgiTable (x, n, c) =>
+                S.map2 (con ctx c,
+                        fn c' =>
+                           (SgiTable (x, n, c'), loc))
 
         and sg ctx s acc =
             S.bindP (sg' ctx s acc, sgn ctx)
@@ -458,7 +462,8 @@
                                                    bind (ctx, Str (x, sgn))
                                                  | SgiSgn (x, _, sgn) =>
                                                    bind (ctx, Sgn (x, sgn))
-                                                 | SgiConstraint _ => ctx,
+                                                 | SgiConstraint _ => ctx
+                                                 | SgiTable _ => ctx,
                                                sgi ctx si)) ctx sgis,
                      fn sgis' =>
                         (SgnConst sgis', loc))
@@ -594,7 +599,8 @@
                                                  | DFfiStr (x, _, sgn) =>
                                                    bind (ctx, Str (x, sgn))
                                                  | DConstraint _ => ctx
-                                                 | DExport _ => ctx,
+                                                 | DExport _ => ctx
+                                                 | DTable _ => ctx,
                                                mfd ctx d)) ctx ds,
                      fn ds' => (StrConst ds', loc))
               | StrVar _ => S.return2 strAll
@@ -682,6 +688,11 @@
                                     fn str' =>
                                        (DExport (en, sgn', str'), loc)))
 
+              | DTable (x, n, c) =>
+                S.map2 (mfc ctx c,
+                        fn c' =>
+                           (DTable (x, n, c'), loc))
+
         and mfvi ctx (x, n, c, e) =
             S.bind2 (mfc ctx c,
                   fn c' =>