[GHC] #15007: Don't keep shadowed variables in ghci, both renamer and type checker

GHC ghc-devs at haskell.org
Wed Jul 4 13:47:28 UTC 2018


#15007: Don't keep shadowed variables in ghci, both renamer and type checker
-------------------------------------+-------------------------------------
        Reporter:  sighingnow        |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  GHCi              |              Version:  8.5
      Resolution:                    |             Keywords:  TypedHoles
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11547 #14052     |  Differential Rev(s):  Phab:D4909
  #15202                             |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by sighingnow):

 This ticket isn't fixed by Phab:D4909. With a debug-enabled stage2
 compiler, for the script in description, we will get a panic:

 {{{
 Prelude> 1
 1
 (0.02 secs, 65,728 bytes)
 Prelude> 1
 1
 (0.00 secs, 64,352 bytes)
 Prelude> _
 ghc-stage2.exe: panic! (the 'impossible' happened)
   (GHC version 8.7.20180629 for x86_64-unknown-mingw32):
         ASSERT failed!
   Cur lvl = 1
   Imp lvl = 1
   Call stack:
       CallStack (from HasCallStack):
         callStackDoc, called at compiler\utils\Outputable.hs:1164:37 in
 ghc:Outputable
         pprPanic, called at compiler\utils\Outputable.hs:1223:5 in
 ghc:Outputable
         assertPprPanic, called at
 compiler\\typecheck\\TcSimplify.hs:1548:120 in ghc:TcSimplify
 CallStack (from -prof):
   HscMain.ioMsgMaybe (compiler\main\HscMain.hs:(252,1)-(257,128))
   HscMain.hscParsedStmt (compiler\main\HscMain.hs:(1548,1)-(1564,36))
   HscMain.hscStmtWithLocation
 (compiler\main\HscMain.hs:(1533,1)-(1541,50))
   GHC.withCleanupSession (compiler\main\GHC.hs:(469,1)-(477,27))
   GHC.runGhc (compiler\main\GHC.hs:(444,1)-(449,26))
   GHC.defaultErrorHandler (compiler\main\GHC.hs:(384,1)-(416,7))
 }}}

 Besides, this ticket is intend to solve the problem described in #11547,
 the ` GHC internal error` (for script reported by #11547) still occurs
 after Phab:D4909.

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


More information about the ghc-tickets mailing list