[GHC] #12525: Internal identifiers creeping into :show bindings

GHC ghc-devs at haskell.org
Tue Aug 23 07:07:52 UTC 2016


#12525: Internal identifiers creeping into :show bindings
-------------------------------------+-------------------------------------
        Reporter:  mniip             |                Owner:
            Type:  bug               |               Status:  new
        Priority:  low               |            Milestone:
       Component:  GHCi              |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Ugh. The underlying problem is that the GHCi `InteractiveContext` doesn't
 make a proper distinction between

 * things lexically in scope (`ic_rn_gbl_env :: GlobalRdrEnv`)
 * things that the typechecker might need (`ic_tythings :: [TyThing]`)

 Instead the former is (more or less, I think) generated from the latter.
 But that's problematic for these internal identifiers.

 We came across this before: #11051.  Easiest fix is to use the same
 solution for `showBindings`, namely to use `isDerivedOccName` to filter
 out the internal ones.  See `Note [What to show to users]` in
 `InteractiveEval.hs`.

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


More information about the ghc-tickets mailing list