X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/d63aa5e7b08630cc17a606e85e35acc5bd0041ee..254d5faaae330b43f04ad7f39fb4340457d78776:/src/env.sml diff --git a/src/env.sml b/src/env.sml index 3b08094..4b5be9d 100644 --- a/src/env.sml +++ b/src/env.sml @@ -219,8 +219,11 @@ val empty : env = (SS.empty, SM.empty, SS.empty, SM.empty) fun initialDynEnvTypes (_, _, _, ds) = SM.map (fn (t, e) => t) ds -fun initialDynEnvVals (_, _, _, ds) = - SM.map (fn (t, v) => v) ds +(* hack ahead: These are not reduced when declared and must be before + starting evaluation. Pass in reduceExp, and force an awkward + calling convention so no one thinks this is the Right Way (tm) *) +fun initialDynEnvVals f (env as (_, _, _, ds)) = + SM.map (fn (t, v) => f env v) ds fun lookupType (ts, _, _, _) name = SS.member (ts, name) fun lookupVal (_, vs, _, _) name =