Skip to content

Running 1 twice, followed by a typed hole, in GHCi causes internal error

Originally reported in #14996 (closed)##15037 (closed). You need GHC HEAD (i.e., more recent than GHC 8.4.1) to trigger this:

$ inplace/bin/ghc-stage2 --interactive
GHCi, version 8.5.20180413: http://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
λ> 1
1
λ> 1
1
λ> _

<interactive>:1:1: error:
    GHC internal error: ‘Ghci1.it’ is not in scope during type checking, but it passed the renamer
    tcl_env of environment: []

And yes, running 1 //twice// seems to be critical to triggering this bug, for some reason.

Trac metadata
Trac field Value
Version 8.5
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information