Fix missing backticks and parentheses in error messages; fixes #7734
authorIan Lynagh <ian@well-typed.com>
Sun, 3 Mar 2013 16:30:23 +0000 (16:30 +0000)
committerIan Lynagh <ian@well-typed.com>
Sun, 3 Mar 2013 16:30:23 +0000 (16:30 +0000)
Patch from monoidal

compiler/hsSyn/HsExpr.lhs

index b4de840..fe44e45 100644 (file)
@@ -910,7 +910,7 @@ pprMatch ctxt (Match pats maybe_ty grhss)
     (herald, other_pats)
         = case ctxt of
             FunRhs fun is_infix
-                | not is_infix -> (ppr fun, pats)
+                | not is_infix -> (pprPrefixOcc fun, pats)
                         -- f x y z = e
                         -- Not pprBndr; the AbsBinds will
                         -- have printed the signature
@@ -921,7 +921,7 @@ pprMatch ctxt (Match pats maybe_ty grhss)
                 | otherwise -> (parens pp_infix, pats2)
                         -- (x &&& y) z = e
                 where
-                  pp_infix = pprParendLPat pat1 <+> ppr fun <+> pprParendLPat pat2
+                  pp_infix = pprParendLPat pat1 <+> pprInfixOcc fun <+> pprParendLPat pat2
 
             LambdaExpr -> (char '\\', pats)