diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-12-13 14:20:41 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-12-13 14:20:41 -0500 |
commit | f5449b93792afc81e4da70d2a790ef7a2d2b49d5 (patch) | |
tree | 14b2deefac4e078e2d5e4e5bdd076749de8659d8 /src/monoize.sml | |
parent | 2319f2ff07432849cc88956ad92467edd2e8bf5e (diff) |
Initializers and setval
Diffstat (limited to 'src/monoize.sml')
-rw-r--r-- | src/monoize.sml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index b92b9c70..503fd6b3 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -2475,6 +2475,13 @@ fun monoExp (env, st, fm) (all as (e, loc)) = 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 @@ fun monoDecl (env, fm) (all as (d, loc)) = [(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 |