diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 11:33:13 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 11:33:13 -0400 |
commit | 5cf1d4d086475575a31f57413c57c22bd6fda378 (patch) | |
tree | ab36ce67d2931f2c715b5b734930139c53adc670 /src/core_print.sml | |
parent | 42c284b9204ef5dfc249cc7273ff2eaa9304e9e6 (diff) |
Converting string to int
Diffstat (limited to 'src/core_print.sml')
-rw-r--r-- | src/core_print.sml | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/src/core_print.sml b/src/core_print.sml index 0d5a61c1..cfd01e2d 100644 --- a/src/core_print.sml +++ b/src/core_print.sml @@ -306,18 +306,30 @@ fun p_exp' par env (e, _) = p_con' true env c]) | EFold _ => string "fold" - | 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 (E.patBinds env p) 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 (E.patBinds env p) e]) pes]) | EWrite e => box [string "write(", p_exp env e, |