summaryrefslogtreecommitdiff
path: root/src/expl_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-07 11:33:13 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-07 11:33:13 -0400
commit5cf1d4d086475575a31f57413c57c22bd6fda378 (patch)
treeab36ce67d2931f2c715b5b734930139c53adc670 /src/expl_print.sml
parent42c284b9204ef5dfc249cc7273ff2eaa9304e9e6 (diff)
Converting string to int
Diffstat (limited to 'src/expl_print.sml')
-rw-r--r--src/expl_print.sml36
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