enclose case expression in brackets
authorhaftmann
Fri, 30 Apr 2010 14:20:55 +0200
changeset 36576 736994daaf08
parent 36544 8da6846b87d9
child 36577 f412bc3f2454
enclose case expression in brackets
src/Tools/Code/code_haskell.ML
--- a/src/Tools/Code/code_haskell.ML	Thu Apr 29 23:55:43 2010 +0200
+++ b/src/Tools/Code/code_haskell.ML	Fri Apr 30 14:20:55 2010 +0200
@@ -109,10 +109,9 @@
               let
                 val (p, vars') = print_bind tyvars some_thm NOBR pat vars;
               in semicolon [p, str "->", print_term tyvars some_thm vars' NOBR body] end;
-          in brackify_block fxy
-            (concat [str "case", print_term tyvars some_thm vars NOBR t, str "of", str "{"])
+          in Pretty.block_enclose
+            (concat [str "(case", print_term tyvars some_thm vars NOBR t, str "of", str "{"], str "})")
             (map print_select clauses)
-            (str "}") 
           end
       | print_case tyvars some_thm vars fxy ((_, []), _) =
           (brackify fxy o Pretty.breaks o map str) ["error", "\"empty case\""];