Opened 12 years ago

Last modified 4 years ago

#2345 new feature request

:browse limitations (browsing virtual namespaces, listing namespaces)

Reported by: claus Owned by:
Priority: lowest Milestone:
Component: GHCi Version: 6.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

  1. :browse cannot be used with virtual namespaces:
    import Prelude ()
    import qualified Data.List  as Folds(foldr)
    import qualified Data.Maybe as Folds(maybe)
    
*Main> :browse *Main
Folds.foldr :: (a -> b -> b) -> b -> [a] -> b
Folds.maybe :: b -> (a -> b) -> Data.Maybe.Maybe a -> b
*Main> :browse *Folds
Could not find module `Folds':
  Use -v to see a list of the files searched for.

it would be useful if GHCi's :browse supported this Haskell module system feature, allowing "virtual" namespaces to be browsed just like "real" ones.

  1. to use :browse, one needs to know the precise module name

when using some packages, like OpenGL, i never can remember where in the hierarchy their modules are placed, so i can't even get started :browsing them.

(a) it would be useful if ghc-pkg functionality was part of the GHC API, and accessible from within GHCi, or if GHCi knew which instance of ghc-pkg it is associated with (:!ghc-pkg field OpenGL exposed-modules does not work unless the ghc-pkg in the PATH happens to match the GHCi in use..).

(b) it would be nicer if GHCi's :browse itself had an option to list available namespaces matching a pattern, so that one could narrow down to what one wants to :browse

Change History (17)

comment:1 Changed 11 years ago by igloo

difficulty: Unknown
Milestone: 6.10 branch

comment:2 Changed 11 years ago by claus

The new ghc-paths package provides a work-around for part 2a, at least:

http://www.haskell.org/haskellwiki/GHC/GHCi#Package_and_documentation_lookup_in_GHCi.2C_via_ghc-paths

comment:3 Changed 11 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:4 Changed 11 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:5 Changed 11 years ago by igloo

Milestone: 6.10 branch6.12 branch

comment:6 Changed 10 years ago by igloo

Milestone: 6.12 branch6.12.3

comment:7 Changed 9 years ago by igloo

Milestone: 6.12.36.14.1
Priority: normallow

comment:8 Changed 9 years ago by igloo

Milestone: 7.0.17.0.2

comment:9 Changed 9 years ago by igloo

Milestone: 7.0.27.2.1

comment:10 Changed 8 years ago by igloo

Milestone: 7.2.17.4.1

comment:11 Changed 8 years ago by igloo

Milestone: 7.4.17.6.1
Priority: lowlowest

comment:12 Changed 7 years ago by igloo

Milestone: 7.6.17.6.2

comment:13 Changed 5 years ago by thoughtpolice

Milestone: 7.6.27.10.1

Moving to 7.10.1.

comment:14 Changed 5 years ago by thoughtpolice

Milestone: 7.10.17.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:15 Changed 5 years ago by thoughtpolice

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:16 Changed 4 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:17 Changed 4 years ago by thomie

Milestone: 8.0.1
Note: See TracTickets for help on using tickets.