diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-08-29 14:38:24 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-08-29 19:08:07 -0400 |
commit | 651b4dc790d931789eb41dd0e8f281de4061824b (patch) | |
tree | 21b8e92fceed2bd40a11e15243382b5727f87a69 /compiler/stgSyn | |
parent | 9d57d8c192cd455aa68a7a0c019df97f68ae015f (diff) | |
download | haskell-651b4dc790d931789eb41dd0e8f281de4061824b.tar.gz |
StgLint: Show type of out-of-scope binders
Reviewers: austin
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3887
Diffstat (limited to 'compiler/stgSyn')
-rw-r--r-- | compiler/stgSyn/StgLint.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/stgSyn/StgLint.hs b/compiler/stgSyn/StgLint.hs index ad7b142b9c..baceca2333 100644 --- a/compiler/stgSyn/StgLint.hs +++ b/compiler/stgSyn/StgLint.hs @@ -459,7 +459,8 @@ stgEqType orig_ty1 orig_ty2 checkInScope :: Id -> LintM () checkInScope id = LintM $ \loc scope errs -> if isLocalId id && not (id `elemVarSet` scope) then - ((), addErr errs (hsep [ppr id, text "is out of scope"]) loc) + ((), addErr errs (hsep [ppr id, dcolon, ppr (idType id), + text "is out of scope"]) loc) else ((), errs) |