#1463: Module → Package lookup in ghc-pkg?
----------------------------------+-----------------------------------------
Reporter: [EMAIL PROTECTED] | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 6.10 branch
Component: Compiler | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Unknown | Testcase:
Architecture: Unknown |
----------------------------------+-----------------------------------------
Comment (by guest):
i've got a minor patch that extends ghci's :info to handle module names as
well, so
{{{
Prelude> :i Prelude Data.Maybe Distribution.System Data.Array
Data.Sequence
module Prelude is in package base
module Data.Maybe is in package base
module Distribution.System is in package Cabal-1.3
module Data.Array is in package array-0.1
module Data.Sequence is in package containers-0.1
}}}
that seemed to be the most obvious place to put it, because both i and
haskell modes tend to use ghci a lot, and i often wondered why :info
<module> didn't work. and with 'ghc -e', any ghci command is as good as a
ghc option. it only gives information on modules in exposed packages, so
{{{
Prelude> :i GHC
Top level: Not in scope: type constructor or class `GHC'
Prelude> :set -package ghc
package flags have changed, ressetting and loading new packages...
Loading package old-locale-1.0 ... linking ... done.
Loading package old-time-1.0 ... linking ... done.
Loading package filepath-1.0 ... linking ... done.
Loading package directory-1.0 ... linking ... done.
Loading package array-0.1 ... linking ... done.
Loading package containers-0.1 ... linking ... done.
Loading package hpc-0.5 ... linking ... done.
Loading package bytestring-0.9 ... linking ... done.
Loading package pretty-1.0 ... linking ... done.
Loading package packedstring-0.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package Win32-2.1 ... linking ... done.
Loading package process-1.0 ... linking ... done.
Loading package Cabal-1.3 ... linking ... done.
Loading package random-1.0 ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package ghc-6.9.20071019 ... linking ... done.
Prelude> :i GHC
module GHC is in package ghc-6.9.20071019
}}}
would this help with your request?
claus
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1463#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs