diff src/shake.sml @ 247:5c50b17f5e4a

Corify tables
author Adam Chlipala <adamc@hcoop.net>
date Sun, 31 Aug 2008 09:00:28 -0400
parents 9bbf4d383381
children d5b12daa9b47
line wrap: on
line diff
--- a/src/shake.sml	Sun Aug 31 08:46:22 2008 -0400
+++ b/src/shake.sml	Sun Aug 31 09:00:28 2008 -0400
@@ -41,6 +41,8 @@
      exp : IS.set
 }
 
+val dummye = (EPrim (Prim.String ""), ErrorMsg.dummySpan)
+
 fun shake file =
     let
         val page_es = List.foldl
@@ -53,7 +55,9 @@
                                    | ((DVal (_, n, t, e, _), _), (cdef, edef)) => (cdef, IM.insert (edef, n, (t, e)))
                                    | ((DValRec vis, _), (cdef, edef)) =>
                                      (cdef, foldl (fn ((_, n, t, e, _), edef) => IM.insert (edef, n, (t, e))) edef vis)
-                                   | ((DExport _, _), acc) => acc)
+                                   | ((DExport _, _), acc) => acc
+                                   | ((DTable (_, n, c, _), _), (cdef, edef)) =>
+                                     (cdef, IM.insert (edef, n, (c, dummye))))
                                  (IM.empty, IM.empty) file
 
         fun kind (_, s) = s
@@ -105,7 +109,8 @@
                       | (DDatatype (_, n, _, _), _) => IS.member (#con s, n)
                       | (DVal (_, n, _, _, _), _) => IS.member (#exp s, n)
                       | (DValRec vis, _) => List.exists (fn (_, n, _, _, _) => IS.member (#exp s, n)) vis
-                      | (DExport _, _) => true) file
+                      | (DExport _, _) => true
+                      | (DTable _, _) => true) file
     end
 
 end