summaryrefslogtreecommitdiff
path: root/src/elaborate.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
commitb225596addee1a3cfd6c3189cff923e7f0e8f7c9 (patch)
tree14b2deefac4e078e2d5e4e5bdd076749de8659d8 /src/elaborate.sml
parent1063981355a5a041793c095c6fd89b91fa0bd579 (diff)
Initializers and setval
Diffstat (limited to 'src/elaborate.sml')
-rw-r--r--src/elaborate.sml10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/elaborate.sml b/src/elaborate.sml
index 71842ec2..327004e2 100644
--- a/src/elaborate.sml
+++ b/src/elaborate.sml
@@ -2548,6 +2548,7 @@ and sgiOfDecl (d, loc) =
| L'.DDatabase _ => []
| L'.DCookie (tn, x, n, c) => [(L'.SgiVal (x, n, (L'.CApp (cookieOf (), c), loc)), loc)]
| L'.DStyle (tn, x, n) => [(L'.SgiVal (x, n, styleOf ()), loc)]
+ | L'.DInitializer _ => []
and subSgn' counterparts env strLoc sgn1 (sgn2 as (_, loc2)) =
((*prefaces "subSgn" [("sgn1", p_sgn env sgn1),
@@ -3668,6 +3669,15 @@ and elabDecl (dAll as (d, loc), (env, denv, gs)) =
in
([(L'.DStyle (!basis_r, x, n), loc)], (env, denv, gs))
end
+ | L.DInitializer e =>
+ let
+ val (e', t, gs) = elabExp (env, denv) e
+ val t' = (L'.CApp ((L'.CModProj (!basis_r, [], "transaction"), loc),
+ (L'.TRecord (L'.CRecord ((L'.KType, loc), []), loc), loc)), loc)
+ in
+ checkCon env e' t t';
+ ([(L'.DInitializer e', loc)], (env, denv, gs))
+ end
(*val tcs = List.filter (fn TypeClass _ => true | _ => false) (#3 (#2 r))*)
in