diff options
Diffstat (limited to 'src/expl_print.sml')
-rw-r--r-- | src/expl_print.sml | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/src/expl_print.sml b/src/expl_print.sml index 05e6da02..10819fbc 100644 --- a/src/expl_print.sml +++ b/src/expl_print.sml @@ -316,18 +316,30 @@ fun p_exp' par env (e, loc) = p_exp env e, string ")"] - | ECase (e, pes, _) => parenIf par (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 env e]) pes]) + | ECase (e, pes, {disc, result}) => + parenIf par (box [string "case", + space, + p_exp env e, + space, + if !debug then + box [string "in", + space, + p_con env disc, + space, + string "return", + space, + p_con 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 env e]) pes]) and p_exp env = p_exp' false env |