External Core: don't print superfluous parens in case types
[ghc-hetmet.git] / compiler / coreSyn / PprExternalCore.lhs
index dd75b62..cb9b0e7 100644 (file)
@@ -61,7 +61,7 @@ ptdef (Newtype tcon tbinds (coercion,k) rep) =
 -- At the same time, we need the newtype decl to declare the tycon itself.
 -- Sigh.
   text "%newtype" <+> pqname tcon <+> (hsep (map ptbind tbinds)) 
-    <+> axiomclause <+> repclause
+    $$ indent (axiomclause $$ repclause)
        where  axiomclause = char '^' <+> parens (pqname coercion <+> text "::"
                                      <+> pkind k)
               repclause   = case rep of
@@ -162,7 +162,7 @@ pappexp e as = fsep (paexp e : map pa as)
 
 pexp (Lam b e) = char '\\' <+> plamexp [b] e
 pexp (Let vd e) = (text "%let" <+> pvdefg vd) $$ (text "%in" <+> pexp e)
-pexp (Case e vb ty alts) = sep [text "%case" <+> parens (paty ty) <+> paexp e,
+pexp (Case e vb ty alts) = sep [text "%case" <+> paty ty <+> paexp e,
                             text "%of" <+> pvbind vb]
                        $$ (indent (braces (vcat (punctuate (char ';') (map palt alts)))))
 pexp (Cast e co) = (text "%cast" <+> parens (pexp e)) $$ paty co