Skip to content

ghci's :info and :browse break encapsulation

In ghci, :info shows representations of abstract data types. I consider this undesirable, since it breaks abstraction and confuses users.

Example:

Prelude> :m +Data.Unique 
Prelude Data.Unique> :i Unique 
newtype Unique = Data.Unique.Unique Integer
  	-- Defined in `Data.Unique'

I would expect it to behave in the same way as Haddock does, i.e. just show "data Unique".

Same about the :browse command.

Trac metadata
Trac field Value
Version 7.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information