
#11801: RFC: Make browse command display everything unqualified -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature request | Status: new Priority: lowest | Milestone: Component: GHCi | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11208 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by nomeata):
My thought would be to display everything unqualified,
Let’s get more concrete. Assume we have this module: {{{#!hs module Foo import Prelude hiding (Either) import qualified Prelude import Bar (OtherType) type SomeType = .. type Either a b = .. foo :: SomeType -> OtherType -> Either a b -> Maybe a -> Prelude.Either a b }}} then currently `:browse Foo` (with only `Prelude` imported, but not `Bar` or `Foo`) would give this {{{#!hs
:browse Foo Foo.foo :: SomeType -> Bar.OtherType -> Foo.Either a b -> Maybe a -> Either a b }}}
Your suggestion (everything unqualified) would be {{{#!hs
:browse Foo type SomeType type Either a b foo :: SomeType -> OtherType -> Either a b -> Maybe a -> Either a b }}}
while mine would yield: {{{#!hs
:browse Foo type SomeType type Either a b foo :: SomeType -> Bar.OtherType -> Foo.Either a b -> Maybe a -> Either a b }}}
Note how my variant of your proposal * avoids disambiguities in the types of symbols, if there are name clashes with type in scope * still indicates modules of symbols that are neither in scope nor from the browsed module * still avoids lots of module prefixes -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11801#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler