what is the path to a particular module?
Peter Hercek
phercek at gmail.com
Sat Aug 15 12:16:16 EDT 2009
On Fri, 14 Aug 2009 14:50:48 -0400, S. Alexander Jacobson wrote:
> Is there a way from GHCi to discover the path to a particular module
> that you have imported or loaded?
It may not be what you wanted but in the worst case you can use ghc-pkg
list to see all the package names then for each name you can do ghc-pkg
describe to see there it is installed and what modules it does expose.
All the information is in <ghc-install-dir>/package.conf which just seems
to be a list of InstalledPackageInfo (Distribution.InstalledPackageInfo).
So it should be possible to write a function you want easily.
Surprisingly when I tried to read the list of InstalledPackageInfo from
my package.conf it failed despite ghc-pkg working well. I did not
investigate why. Maybe there is a better way.
Peter.
More information about the Glasgow-haskell-users
mailing list