[commit: ghc] master: Fix missing backticks and parentheses in error messages; fixes #7734 (4348e0b)

Ian Lynagh igloo at earth.li
Sun Mar 3 18:13:01 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/4348e0b4401047f019f6a1ae89d5906fb628dcaa

>---------------------------------------------------------------

commit 4348e0b4401047f019f6a1ae89d5906fb628dcaa
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sun Mar 3 16:30:23 2013 +0000

    Fix missing backticks and parentheses in error messages; fixes #7734
    
    Patch from monoidal

>---------------------------------------------------------------

 compiler/hsSyn/HsExpr.lhs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/hsSyn/HsExpr.lhs b/compiler/hsSyn/HsExpr.lhs
index b4de840..fe44e45 100644
--- a/compiler/hsSyn/HsExpr.lhs
+++ b/compiler/hsSyn/HsExpr.lhs
@@ -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)
 





More information about the ghc-commits mailing list