
#11051: GHCi with +t option set shows type representations -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | 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: | -------------------------------------+------------------------------------- Comment (by bgamari): As it turns out generic deriving is also bitten by this, {{{ GHCi, version 7.10.2: http://www.haskell.org/ghc/ :? for help λ> :set +t λ> :set -XDeriveGeneric λ> import GHC.Generics λ> data Hello = Hello Int deriving (Eq, Generic) abstract C1_0Hello abstract D1Hello data Hello = Hello Int abstract S1_0_0Hello }}} For the record, `hscDeclsWithLocation` in `HscMain` is responsible for the evaluation and generation of `TyThings`. Currently it drops `TyThings` corresponding to implicit `TyCons`/`Ids` and `DFunIds`, {{{#!hs let tcs = filterOut isImplicitTyCon (mg_tcs simpl_mg) patsyns = mg_patsyns simpl_mg ext_ids = [ id | id <- bindersOfBinds core_binds , isExternalName (idName id) , not (isDFunId id || isImplicitId id) ] -- We only need to keep around the external bindings -- (as decided by TidyPgm), since those are the only ones -- that might later be looked up by name. But we can exclude -- - DFunIds, which are in 'cls_insts' (see Note [ic_tythings] in HscTypes -- - Implicit Ids, which are implicit in tcs -- c.f. TcRnDriver.runTcInteractive, which reconstructs the TypeEnv }}} This would be one place to drop the bindings covered by this ticket. However, in order to do this we need to find a way to encode the fact that the bindings are generated. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11051#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler