Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ae2d23ed5a9f9ec5e488d3eafd11c34b69ee387e

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

commit ae2d23ed5a9f9ec5e488d3eafd11c34b69ee387e
Author: Max Bolingbroke <[email protected]>
Date:   Tue Mar 20 15:26:43 2012 +0000

    Print more information when out-of-scope detected by linter

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

 compiler/coreSyn/CoreLint.lhs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/coreSyn/CoreLint.lhs b/compiler/coreSyn/CoreLint.lhs
index e07c87b..447ed15 100644
--- a/compiler/coreSyn/CoreLint.lhs
+++ b/compiler/coreSyn/CoreLint.lhs
@@ -1026,7 +1026,7 @@ lookupIdInScope id
                Nothing -> do { addErrL out_of_scope
                              ; return id } }
   where
-    out_of_scope = ppr id <+> ptext (sLit "is out of scope")
+    out_of_scope = pprBndr LetBind id <+> ptext (sLit "is out of scope")
 
 
 oneTupleDataConId :: Id        -- Should not happen
@@ -1046,7 +1046,7 @@ checkInScope :: SDoc -> Var -> LintM ()
 checkInScope loc_msg var =
  do { subst <- getTvSubst
     ; checkL (not (mustHaveLocalBinding var) || (var `isInScope` subst))
-             (hsep [ppr var, loc_msg]) }
+             (hsep [pprBndr LetBind var, loc_msg]) }
 
 checkTys :: OutType -> OutType -> MsgDoc -> LintM ()
 -- check ty2 is subtype of ty1 (ie, has same structure but usage



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to