[GHC] #15007: Don't keep shadowed variables in ghci, both renamer and type checker
GHC
ghc-devs at haskell.org
Sat Apr 14 14:22:21 UTC 2018
#15007: Don't keep shadowed variables in ghci, both renamer and type checker
-------------------------------------+-------------------------------------
Reporter: sighingnow | Owner: sighingnow
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):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* keywords: => TypedHoles
Old description:
> In ticket:14052, we reverted Phab:D2447, then ticket:11547 exists in HEAD
> again. In ticket:14052#comment:25 and ticket:14052#comment:10, we decide
> that shadowed variables shouldn't be keep at all. This ticket is created
> to track the idea.
>
> The same error of ticket:11547 was also reported in
> ticket:14996#comment:2,
>
> > {{{#!hs
> > $ 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.
New description:
In ticket:14052, we reverted Phab:D2447, then ticket:11547 exists in HEAD
again. In ticket:14052#comment:25 and ticket:14052#comment:10, we decide
that shadowed variables shouldn't be keep at all. This ticket is created
to track the idea.
The same error of ticket:11547 was also reported in
ticket:14996#comment:2,
> {{{
> $ 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.
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15007#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list