diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-12-31 18:07:53 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-12-31 18:07:53 -0500 |
commit | cc0f3b1b858aa0993d48f672fdbda04736afb635 (patch) | |
tree | 0bde2b80fc3e8df14cd6e16f05bdd88e062aca9a /src/mono_print.sml | |
parent | 00b1094540b7ae07941b97e3714967eb4519cb1b (diff) |
Eta-expand bodies of transaction functions in Monoization, to enable later optimization
Diffstat (limited to 'src/mono_print.sml')
-rw-r--r-- | src/mono_print.sml | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/mono_print.sml b/src/mono_print.sml index d190640e..a5e795b2 100644 --- a/src/mono_print.sml +++ b/src/mono_print.sml @@ -206,18 +206,26 @@ fun p_exp' par env (e, _) = string ".", string x] - | ECase (e, pes, _) => parenIf true (box [string "case", - space, - p_exp env e, - space, - string "of", - space, - p_list_sep (box [space, string "|", space]) - (fn (p, e) => box [p_pat env p, - space, - string "=>", - space, - p_exp (E.patBinds env p) e]) pes]) + | ECase (e, pes, {result, ...}) => parenIf true (box [string "case", + space, + p_exp env e, + space, + if !debug then + box [string "return", + space, + p_typ env result, + space] + else + box [], + string "of", + space, + p_list_sep (box [space, string "|", space]) + (fn (p, e) => box [p_pat env p, + space, + string "=>", + space, + p_exp (E.patBinds env p) e]) + pes]) | EError (e, t) => box [string "(error", space, |