Understanding directory structure of ghc installation
Simon Marlow
simonmarhaskell at gmail.com
Thu Jun 1 08:08:30 EDT 2006
Brian Hulley wrote:
> Hi -
> I've just downloaded and installed Edison using Cabal.
> However I now see that Edison seems to have been already installed with
> the ghc 6.4.2 installation, even though there's no mention of Edison in
> /doc/html/libraries/index.html, because there are old Edison .hi files in
>
> ghc-6.4.2/hslibs-imports/data
>
> whereas the Cabal install process copied newly built Edison files to
> C:\Program Files\Haskell\EdisonAPI-1.2\ghc-6.4.2\Data
> and
> C:\Program Files\Haskell\EdisonCore-1.2\ghc-6.4.2\Data
>
> I was about to just delete the old .hi files from the
> hslibs-imports/data directory, but then I noticed there are a few .hi
> files there for Set and FiniteMap, even though there are also .hi files
> (though of different sizes) for Set and FiniteMap stored in the
> imports/data directory as well.
>
> So my question is: how to understand all this? Why are there different
> copies of Set.hi which have different sizes, but in the same
> installation, and which one does ghc use when I use import Data.Set in a
> program?
Everything in hslibs-imports is for the old "hslibs" libraries. These
are the non-hierarchical libraries that came with GHC < 5.04 and are
still provided for backwards compatibility, although they will be
removed in GHC 6.6.
The documentation for the old libraries is here:
http://www.haskell.org/ghc/docs/latest/html/hslibs/index.html
(which is linked from the GHC documentation page, "(Old) Haskell
Libraries").
> Also, what does .p_hi mean? (The new build of Edison only creates .hi
> files not .p_hi files but all the ghc-6.4.2 modules have both .hi and
> .p_hi files)
the .p_hi are the interface files for the profiling versions of these
modules. If you configure with --enable-library-profiling you will get
profiling libs for a Cabal package too.
> (It would also be interesting to know where Cabal gets the information
> from to configure a package, and where the package database is stored...)
Cabal needs to collect various information: what GHC version you have,
what versions of packages are available, etc.
The ghc-pkg command is the interface to the package database. It will
tell you where your package database is stored ("ghc-pkg list").
Cheers,
Simon
More information about the Glasgow-haskell-users
mailing list