diff src/core_util.sml @ 1073:b2311dfb3158

Initializers and setval
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Dec 2009 14:20:41 -0500
parents dfe34fad749d
children 0657e5adc938
line wrap: on
line diff
--- a/src/core_util.sml	Sun Dec 13 13:00:55 2009 -0500
+++ b/src/core_util.sml	Sun Dec 13 14:20:41 2009 -0500
@@ -971,6 +971,10 @@
                      fn c' =>
                         (DCookie (x, n, c', s), loc))
               | DStyle _ => S.return2 dAll
+              | DInitializer e =>
+                S.map2 (mfe ctx e,
+                     fn e' =>
+                        (DInitializer e', loc))
 
         and mfvi ctx (x, n, t, e, s) =
             S.bind2 (mfc ctx t,
@@ -1125,6 +1129,7 @@
                                         in
                                             bind (ctx, NamedE (x, n, t, NONE, s))
                                         end
+                                      | DInitializer _ => ctx
                             in
                                 S.map2 (mff ctx' ds',
                                      fn ds' =>
@@ -1187,7 +1192,8 @@
                           | DView (_, n, _, _, _) => Int.max (n, count)
                           | DDatabase _ => count
                           | DCookie (_, n, _, _) => Int.max (n, count)
-                          | DStyle (_, n, _) => Int.max (n, count)) 0
+                          | DStyle (_, n, _) => Int.max (n, count)
+                          | DInitializer _ => count) 0
               
 end