Skip to content

Don't keep shadowed variables in ghci, both renamer and type checker

In #14052 (closed), we reverted D2447, then #11547 (closed) exists in HEAD again. In ticket:14052#comment:151549 and ticket:14052#comment:140478, we decide that shadowed variables shouldn't be keep at all. This ticket is created to track the idea.

The same error of #11547 (closed) was also reported in ticket:14996#comment:151477,

$ inplace/bin/ghc-stage2 --interactive
GHCi, version 8.5.20180403: http://www.haskell.org/ghc/  :? for help
Prelude> 1
1
Prelude> 1
1
Prelude> _

<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: []

(giving "1" twice is needed to reproduce the error)

NB: input "1" twice to create shadowed context is necessary to reproduce this bug.

Edited by Ryan Scott
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information