Mercurial > urweb
diff src/mono_opt.sml @ 495:98f85c1bc867
Fix type calculation for applying-a-case optimization
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 11 Nov 2008 20:24:55 -0500 |
parents | 8e055bbbd28b |
children | 65d8541c130b |
line wrap: on
line diff
--- a/src/mono_opt.sml Tue Nov 11 19:58:25 2008 -0500 +++ b/src/mono_opt.sml Tue Nov 11 20:24:55 2008 -0500 @@ -292,7 +292,7 @@ {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 @@ 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,