summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-11-11 20:24:55 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-11-11 20:24:55 -0500
commit0510db82b18aae60ca4e9f5935ad0f18e0b1a1ea (patch)
tree284bd324357d03f00dddeea4d676ecd62d174c42 /src
parent8d6ea0f475b6a47a2f1072897b226d51648eb3f7 (diff)
Fix type calculation for applying-a-case optimization
Diffstat (limited to 'src')
-rw-r--r--src/mono_opt.sml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mono_opt.sml b/src/mono_opt.sml
index e350db1d..b56372c7 100644
--- a/src/mono_opt.sml
+++ b/src/mono_opt.sml
@@ -292,7 +292,7 @@ fun exp e =
{disc = disc,
result = (TRecord [], loc)}), loc)
- | EApp ((ECase (discE, pes, {disc, ...}), loc), arg as (ERecord [], _)) =>
+ | EApp ((ECase (discE, pes, {disc, result = (TFun (_, ran), _)}), loc), arg as (ERecord [], _)) =>
let
fun doBody e =
case #1 e of
@@ -302,7 +302,7 @@ fun exp e =
optExp (ECase (discE,
map (fn (p, e) => (p, doBody e)) pes,
{disc = disc,
- result = (TRecord [], loc)}), loc)
+ result = ran}), loc)
end
| EWrite (EQuery {exps, tables, state, query,