diff options
author | Max Bolingbroke <batterseapower@hotmail.com> | 2012-03-20 15:26:43 +0000 |
---|---|---|
committer | Max Bolingbroke <batterseapower@hotmail.com> | 2012-03-21 21:04:10 +0000 |
commit | ae2d23ed5a9f9ec5e488d3eafd11c34b69ee387e (patch) | |
tree | f324eea3207b1dcf1c2cc3da4b23b9bee9c403c6 | |
parent | 11feda6a360d48bc930e20c14e8cf052ef0795e9 (diff) | |
download | haskell-ae2d23ed5a9f9ec5e488d3eafd11c34b69ee387e.tar.gz |
Print more information when out-of-scope detected by linter
-rw-r--r-- | 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 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 |