From 5cf1d4d086475575a31f57413c57c22bd6fda378 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 7 Sep 2008 11:33:13 -0400 Subject: Converting string to int --- src/core_print.sml | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'src/core_print.sml') 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, -- cgit v1.2.3