Mercurial > urweb
diff src/monoize.sml @ 1073:b2311dfb3158
Initializers and setval
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 13 Dec 2009 14:20:41 -0500 |
parents | 9001966ae1c8 |
children | 0657e5adc938 |
line wrap: on
line diff
--- a/src/monoize.sml Sun Dec 13 13:00:55 2009 -0500 +++ b/src/monoize.sml Sun Dec 13 14:20:41 2009 -0500 @@ -2475,6 +2475,13 @@ in ((L'.ENextval e, loc), fm) end + | L.EFfiApp ("Basis", "setval", [e1, e2]) => + let + val (e1, fm) = monoExp (env, st, fm) e1 + val (e2, fm) = monoExp (env, st, fm) e2 + in + ((L'.ESetval (e1, e2), loc), fm) + end | L.EApp ( (L.ECApp ( @@ -3471,6 +3478,14 @@ [(L'.DStyle s, loc), (L'.DVal (x, n, t', e, s), loc)]) end + | L.DInitializer e => + let + val (e, fm) = monoExp (env, St.empty, fm) e + in + SOME (env, + fm, + [(L'.DInitializer e, loc)]) + end end datatype expungable = Client | Channel