diff src/shake.sml @ 1073:b2311dfb3158

Initializers and setval
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Dec 2009 14:20:41 -0500
parents 3bc726a822fb
children 0657e5adc938
line wrap: on
line diff
--- a/src/shake.sml	Sun Dec 13 13:00:55 2009 -0500
+++ b/src/shake.sml	Sun Dec 13 14:20:41 2009 -0500
@@ -79,6 +79,7 @@
                     in
                         (usedE, usedC)
                     end
+                  | ((DInitializer e, _), st) => usedVars st e
                   | (_, acc) => acc) (IS.empty, IS.empty) file
 
         val (cdef, edef) = foldl (fn ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, [c]), edef)
@@ -104,7 +105,8 @@
                                    | ((DCookie (_, n, c, _), _), (cdef, edef)) =>
                                      (cdef, IM.insert (edef, n, ([], c, dummye)))
                                    | ((DStyle (_, n, _), _), (cdef, edef)) =>
-                                     (cdef, IM.insert (edef, n, ([], dummyt, dummye))))
+                                     (cdef, IM.insert (edef, n, ([], dummyt, dummye)))
+                                   | ((DInitializer _, _), acc) => acc)
                                  (IM.empty, IM.empty) file
 
         fun kind (_, s) = s
@@ -183,7 +185,8 @@
                       | (DTable _, _) => true
                       | (DDatabase _, _) => true
                       | (DCookie _, _) => true
-                      | (DStyle _, _) => true) file
+                      | (DStyle _, _) => true
+                      | (DInitializer _, _) => true) file
     end
 
 end