summaryrefslogtreecommitdiff
path: root/src/mono_env.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-03 13:30:27 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-03 13:30:27 -0400
commitb6123d25d202d3cbe1f12d24dec129a90d5051ec (patch)
tree5537d58d7dba623127804b35813d7c0ec673f8b9 /src/mono_env.sml
parent6314b4c27a14576b356258dad74607168135cb51 (diff)
Optimizing 'case' in Mono_reduce
Diffstat (limited to 'src/mono_env.sml')
-rw-r--r--src/mono_env.sml8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mono_env.sml b/src/mono_env.sml
index f2be9b4b..f5f1f3d9 100644
--- a/src/mono_env.sml
+++ b/src/mono_env.sml
@@ -39,7 +39,7 @@ type env = {
datatypes : (string * (string * int * typ option) list) IM.map,
constructors : (string * typ option * int) IM.map,
- relE : (string * typ) list,
+ relE : (string * typ * exp option) list,
namedE : (string * typ * exp option * string) IM.map
}
@@ -70,11 +70,11 @@ fun lookupConstructor (env : env) n =
NONE => raise UnboundNamed n
| SOME x => x
-fun pushERel (env : env) x t =
+fun pushERel (env : env) x t eo =
{datatypes = #datatypes env,
constructors = #constructors env,
- relE = (x, t) :: #relE env,
+ relE = (x, t, eo) :: #relE env,
namedE = #namedE env}
fun lookupERel (env : env) n =
@@ -110,7 +110,7 @@ fun declBinds env (d, loc) =
fun patBinds env (p, loc) =
case p of
PWild => env
- | PVar (x, t) => pushERel env x t
+ | PVar (x, t) => pushERel env x t NONE
| PPrim _ => env
| PCon (_, NONE) => env
| PCon (_, SOME p) => patBinds env p