diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-07-13 10:17:06 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-07-13 10:17:06 -0400 |
commit | 3316f3c317e587a5fc2ecf38f061a72b48e3b94e (patch) | |
tree | fae8c92c195e5f7976352a337017d285e729f859 /src/core_env.sml | |
parent | 7281dbb2fc2a5f50c1049bad629f330e2ff3f7ca (diff) |
Remove closure conversion in favor of zany fun with modules, which also replaces 'page'
Diffstat (limited to 'src/core_env.sml')
-rw-r--r-- | src/core_env.sml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core_env.sml b/src/core_env.sml index 2b6de82c..5a24a82a 100644 --- a/src/core_env.sml +++ b/src/core_env.sml @@ -62,7 +62,7 @@ type env = { namedC : (string * kind * con option) IM.map, relE : (string * con) list, - namedE : (string * con * exp option) IM.map + namedE : (string * con * exp option * string) IM.map } val empty = { @@ -78,7 +78,7 @@ fun pushCRel (env : env) x k = namedC = IM.map (fn (x, k, co) => (x, k, Option.map lift co)) (#namedC env), relE = map (fn (x, c) => (x, lift c)) (#relE env), - namedE = IM.map (fn (x, c, eo) => (x, lift c, eo)) (#namedE env)} + namedE = IM.map (fn (x, c, eo, s) => (x, lift c, eo, s)) (#namedE env)} fun lookupCRel (env : env) n = (List.nth (#relC env, n)) @@ -107,12 +107,12 @@ fun lookupERel (env : env) n = (List.nth (#relE env, n)) handle Subscript => raise UnboundRel n -fun pushENamed (env : env) x n t eo = +fun pushENamed (env : env) x n t eo s = {relC = #relC env, namedC = #namedC env, relE = #relE env, - namedE = IM.insert (#namedE env, n, (x, t, eo))} + namedE = IM.insert (#namedE env, n, (x, t, eo, s))} fun lookupENamed (env : env) n = case IM.find (#namedE env, n) of @@ -122,7 +122,7 @@ fun lookupENamed (env : env) n = fun declBinds env (d, _) = case d of DCon (x, n, k, c) => pushCNamed env x n k (SOME c) - | DVal (x, n, t, e) => pushENamed env x n t (SOME e) - | DPage _ => env + | DVal (x, n, t, e, s) => pushENamed env x n t (SOME e) s + | DExport _ => env end |