summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Bolingbroke <batterseapower@hotmail.com>2012-03-20 15:26:43 +0000
committerMax Bolingbroke <batterseapower@hotmail.com>2012-03-21 21:04:10 +0000
commitae2d23ed5a9f9ec5e488d3eafd11c34b69ee387e (patch)
treef324eea3207b1dcf1c2cc3da4b23b9bee9c403c6
parent11feda6a360d48bc930e20c14e8cf052ef0795e9 (diff)
downloadhaskell-ae2d23ed5a9f9ec5e488d3eafd11c34b69ee387e.tar.gz
Print more information when out-of-scope detected by linter
-rw-r--r--compiler/coreSyn/CoreLint.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/coreSyn/CoreLint.lhs b/compiler/coreSyn/CoreLint.lhs
index e07c87bbc5..447ed153cb 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