[GHC] #11801: RFC: Make browse command display everything unqualified

GHC ghc-devs at haskell.org
Wed Apr 6 21:31:42 UTC 2016


#11801: RFC: Make browse command display everything unqualified
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:
               Type:  feature        |            Status:  new
  request                            |
           Priority:  lowest         |         Milestone:
          Component:  GHCi           |           Version:
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 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
 ...
 }}}

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


More information about the ghc-tickets mailing list