[GHC] #16346: Lint error on master: Occurrence is GlobalId, but binding is LocalId

GHC ghc-devs at haskell.org
Wed Feb 20 14:39:39 UTC 2019


#16346: Lint error on master: Occurrence is GlobalId, but binding is LocalId
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Changing the definition of `refineFromInScope` to
 {{{
   | isLocalId v = case lookupInScope in_scope v of
                   Just v' -> v'
                   Nothing -> WARN( True, ppr v ) v  -- This is an error!
   | otherwise = case lookupInScope in_scope v of
                   Just v' -> v'
                   Nothing -> v
 }}}
 fixes the panic.  (Although in a very unsatisfactory way, because we
 thereby look up ''every'' `GlobalId`.)

 But we just get another panic!  This time in the `cabal` library, module
 `Distribution.Types.ComponentRequestedSpec`:
 {{{
 *** Core Lint errors : in result of Simplifier ***
 <no location info>: warning:
     [in body of lambda with binder w5_afxc :: Success ...snipped...
     Out of scope: $fSumSizeM2_r14m :: Word64
                   [LclId]
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16346#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list