[commit: ghc] master: StgLint: Show type of out-of-scope binders (651b4dc)

git at git.haskell.org git at git.haskell.org
Tue Aug 29 23:10:54 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/651b4dc790d931789eb41dd0e8f281de4061824b/ghc

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

commit 651b4dc790d931789eb41dd0e8f281de4061824b
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Tue Aug 29 14:38:24 2017 -0400

    StgLint: Show type of out-of-scope binders
    
    Reviewers: austin
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3887


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

651b4dc790d931789eb41dd0e8f281de4061824b
 compiler/stgSyn/StgLint.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/stgSyn/StgLint.hs b/compiler/stgSyn/StgLint.hs
index ad7b142..baceca2 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)
 



More information about the ghc-commits mailing list