diff options
author | Adam Chlipala <adam@chlipala.net> | 2011-03-28 10:37:49 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2011-03-28 10:37:49 -0400 |
commit | 039b577f61a2bdf98abe10c5f10c8e3539a59d19 (patch) | |
tree | aa345d555a5a355451eb600cc3d8bcec5bfb9514 /src/mono_reduce.sml | |
parent | 9d944623ffa77af076486fd0f9550a1eaf64db33 (diff) |
To generate server-side source JavaScript, try both the old and new strategies; remove an unsound optimization from MonoOpt and make MonoReduce work harder to compensate
Diffstat (limited to 'src/mono_reduce.sml')
-rw-r--r-- | src/mono_reduce.sml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mono_reduce.sml b/src/mono_reduce.sml index 15549175..06075954 100644 --- a/src/mono_reduce.sml +++ b/src/mono_reduce.sml @@ -635,6 +635,7 @@ fun reduce file = fun safe (e, _) = case e of EAbs _ => true + | EError _ => true | _ => false in if List.all (safe o #2) pes then @@ -642,6 +643,8 @@ fun reduce file = (ECase (liftExpInExp 0 e', map (fn (p, (EAbs (_, _, _, e), _)) => (p, swapExpVarsPat (0, patBinds p) e) + | (p, (EError (e, (TFun (_, t), _)), loc)) => + (p, (EError (e, t), loc)) | _ => raise Fail "MonoReduce ECase") pes, {disc = disc, result = result}), loc)) else |