ghc-pkg info

Simon Marlow simonmar@microsoft.com
Mon, 22 Apr 2002 10:43:00 +0100


> Simon Marlow wrote:
>=20
> >>It would be nice if ghc-pkg had options to display the value=20
> >>of $libdir or at least the given conf file. [...]
>=20
>=20
> I had *major* pains with this for the upcoming HOpenGL=20
> release, too.  :-P

Well, I must admit we didn't anticipate that folk would actually want to
know what the value of $libdir was - indeed the whole point of the
exercise was to abstract away from the actual value so that you could
install a GHC tree wherever you like and just change one thing, $libdir
(this was part of making the installation process more painless on
Windows).

On Windows, the value of $libdir is (I believe) not even stored anywhere
- it is derived from the location of the ghc.exe binary.

> > 'ghc -v' will tell you the location of package.conf, which=20
> for a normal
> > GHC install is located in $libdir.  Does that help?
>=20
> Ooops, never noticed that. Since when (GHC x.y) has this been=20
> working?

Since 5.00, I think.

> Is this the "official" way?

Well, there isn't really an official way, but we'll continue to output
this as part of ghc -v if that would help.

> IMHO it's quite important, because  due to the heavy
> inter-module optimizations, packages are closely tied to a=20
> specific GHC version,
> so $libdir is the only sensible place for package installation.

I don't think I agree that external packages should be installed in
GHC's $libdir - by all means include the GHC version in the directory
name, but I don't see the need to actually place the files in GHC's
installation area.

Cheers,
	Simon