summaryrefslogtreecommitdiff
path: root/src/monoize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-13 14:20:41 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-13 14:20:41 -0500
commitf5449b93792afc81e4da70d2a790ef7a2d2b49d5 (patch)
tree14b2deefac4e078e2d5e4e5bdd076749de8659d8 /src/monoize.sml
parent2319f2ff07432849cc88956ad92467edd2e8bf5e (diff)
Initializers and setval
Diffstat (limited to 'src/monoize.sml')
-rw-r--r--src/monoize.sml15
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