RE: GHC as a package

On 08 February 2005 12:43, Lennart Kolmodin wrote:
I'm working on an IDE for Haskell, written in Haskell. Currently, I'm looking for a way to parse .hs-files for a module browser and I recall that Simon Marlow was going to release GHC as a package "soon". We could also use that package to compile source code without invoking ghc as a separate process.
What is the status of the package and where can I get it? I can't find it in the CVS or in any of the snapshots.
You can currently compile GHC as a package, but the part that is missing is a well-thought-out API to access the facilities of GHC. We'd like to do this, and indeed it will probably emerge as part of the work we're doing on a Visual Studio plug-in, but currently other things have higher priority. We plan to get back to work on Visual Studio during March. To compile GHC as a package, get a recent GHC source tree and set 'BuildPackageGHC=YES' in your mk/build.mk. You should also set $(GHC_PKG) to point to your ghc-pkg command. Then build ghc as normal, and in ghc/compiler say 'make install-inplace-pkg' to register the package (this won't do any actual installation, just register the package with your installed GHC). Cheers, Simon

Simon Marlow wrote:
To compile GHC as a package, get a recent GHC source tree and set 'BuildPackageGHC=YES' in your mk/build.mk. You should also set $(GHC_PKG) to point to your ghc-pkg command. Then build ghc as normal, and in ghc/compiler say 'make install-inplace-pkg' to register the package (this won't do any actual installation, just register the package with your installed GHC).
I have ghc-6.2.2 installed on my system and it could not build ghc if I set BuildPackageGHC=YES. It failed with WARNING: error while reading directory gnore-package ghc-6.2.2: file `ghc' does not exist so I guess it didn't understand the parameters "-ignore-package ghc". If I download a recent snapshot of ghc-6.4, compile it, set BuildPackageGHC=YES, how can I compile the package using that compiler? And will that package be compatible with my installation of ghc-6.2.2? Thanks in advance, Lennart
participants (2)
-
Lennart Kolmodin
-
Simon Marlow