Skip to content

RFC: Make browse command display everything unqualified

What the title says, sometimes the output of :browse (:bro) is highly verbose. If you want unqualified names you need to (as far as I know) import the modules in question, even then names may still be qualified if they clash with names from other modules in scope.

ghci> :browse Control.Applicative.Free
data Control.Applicative.Free.Ap (f :: * -> *) a where
  Control.Applicative.Free.Pure :: a
                                   -> Control.Applicative.Free.Ap f a
  Control.Applicative.Free.Ap :: (f a1)
                                 -> (Control.Applicative.Free.Ap f (a1 -> a))
                                 -> Control.Applicative.Free.Ap f a
Control.Applicative.Free.hoistAp ::
  (forall a. f a -> g a)
  -> Control.Applicative.Free.Ap f b
  -> Control.Applicative.Free.Ap g b

versus

ghci> :newbrowse Control.Applicative.Free
data Ap (f :: * -> *) a where
  Pure :: a -> Ap f a
  Ap :: (f a1) -> (Ap f (a1 -> a)) -> Ap f a
hoistAp :: (forall a. f a -> g a) -> Ap f b -> Ap g b
...
Trac metadata
Trac field Value
Version
Type FeatureRequest
TypeOfFailure OtherFailure
Priority lowest
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