diff src/expl_print.sml @ 288:4260ad920c36

Converting string to int
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Sep 2008 11:33:13 -0400
parents 42dfb0d61cf0
children e976b187d73a
line wrap: on
line diff
--- a/src/expl_print.sml	Sun Sep 07 10:52:51 2008 -0400
+++ b/src/expl_print.sml	Sun Sep 07 11:33:13 2008 -0400
@@ -316,18 +316,30 @@
                          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