Understanding directory structure of ghc installation

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? 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) (It would also be interesting to know where Cabal gets the information from to configure a package, and where the package database is stored...) Thanks, Brian. -- Logic empowers us and Love gives us purpose. Yet still phantoms restless for eras long past, congealed in the present in unthought forms, strive mightily unseen to destroy us. http://www.metamilk.com

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

On Jun 1, 2006, at 6:36 AM, Brian Hulley wrote:
Hi - I've just downloaded and installed Edison using Cabal.
How did that go for you? You appear to have had some success ;-) I ask because 1.2rc4 has a new build system and I'm interested in your experience. Also, have you tried running the test suite?
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?
Simon already touched on this, but let me be a little more explicit: GHC < 5.04 included a version of the Edison library in its standard libraries. At the time it was not being maintained and when GHC moved to the hierarchical libraries, Edison was not included. Thus, the old standard libraries include Edison (version 1.0 I believe) in a flat namespace and the new standard libraries do not include Edison. I have recently undertaken the maintenance of Edison. All Edison packages I have released have the Edison modules under "Data.Edison.*" in the module hierarchy and should not clash with older Edison versions. Also, Edison does not provide the "Data.Set" or "Data.Map" modules. It does, however, provide light wrappers for them which allows you to use Data.Set and Data.Map via the Edison API. These wrappers are Data.Edison.Coll.StandardSet and Data.Edison.Assoc.StandardMap. I hope that clears up any confusion. BTW, I'll be releasing Edison 1.2 final very soon now (probably this weekend, when I can steal a few moments to roll the tarballs).
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)
(It would also be interesting to know where Cabal gets the information from to configure a package, and where the package database is stored...)
Thanks, Brian.
Rob Dockins Speak softly and drive a Sherman tank. Laugh hard; it's a long way to the bank. -- TMBG

Robert Dockins wrote:
On Jun 1, 2006, at 6:36 AM, Brian Hulley wrote:
Hi - I've just downloaded and installed Edison using Cabal.
How did that go for you? You appear to have had some success ;-) I ask because 1.2rc4 has a new build system and I'm interested in your experience. Also, have you tried running the test suite?
It installed perfectly! I was very pleasantly surprised at how easy it was because I'd never used Cabal before. (I installed the API and Core separately to avoid having to use the makefile because the makefile won't work on Windows afaik (there is no rm -r command for example)) The test suite also builds and runs without any errors. A very minor thing is that for some reason installing Edison also created the following 2 empty directories: C:\Program Files\EdisonAPI-1.2 and C:\Program Files\EdisonCore-1.2 but maybe that's just a side effect of Cabal. I imagine this is generic behaviour for installing anything under Windows because this is what you'd want if you used Cabal to install an app. And the only other tiny point is that the README file for the test suite gives the wrong directory for the program to run - it should say: ./dist/build/testSuite/testSuite instead of ./dist/build/src/testSuite Anyway that's such a trifle it is almost embarassing to point it out!!! :-) Best regards, Brian. -- Logic empowers us and Love gives us purpose. Yet still phantoms restless for eras long past, congealed in the present in unthought forms, strive mightily unseen to destroy us. http://www.metamilk.com
participants (3)
-
Brian Hulley
-
Robert Dockins
-
Simon Marlow