[GHC] #11051: GHCi with +t option set shows type representations

GHC ghc-devs at haskell.org
Mon Nov 2 08:56:03 UTC 2015


#11051: GHCi with +t option set shows type representations
-------------------------------------+-------------------------------------
           Reporter:  bgamari        |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.11
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Incorrect result
  Unknown/Multiple                   |  at runtime
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 hvr reported this morning that defining a data type in GHCi with the show
 types (`:set +t`) option set results in additional unexpected output. For
 instance,

 {{{
 $ inplace/bin/ghc-stage2 --interactive
 GHCi, version 7.11.20151101: http://www.haskell.org/ghc/  :? for help
 Prelude> :set +t
 Prelude> data Hi
 $tcHi :: TyCon
 $trModule :: Module
 data Hi
 Prelude>
 }}}

 The `$tcHi` and `$trModule` bindings are details of the Typeable
 implementation introduced in Phab:D1404 and should likely be hidden from
 the user.

 This would be trivial to fix except for the fact that we currently have no
 way to identify this sort of `Name`. In fact any knowledge that the name
 was generated appears to have been thrown away as early as
 `OccName.mkTyConRepSysOcc`.

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


More information about the ghc-tickets mailing list