Haddock version during build
Simon Marlow
marlowsd at gmail.com
Wed Jun 18 03:53:35 EDT 2008
Claus Reinke wrote:
>> I wasn't entirely serious when I suggested XML :-)
> :-)
> You still seem to be using {-# LANGUAGE TongueInCheek #-} here:
>
>> So you're just asking for some way to get the available packages using
>> the GHC API? You can do it right now:
>>
>> Prelude> import Packages
>> Prelude Packages> map (showPackageId.package) (UniqFM.eltsUFM
>> (pkgIdMap (DynFlags.pkgState dflags)))
>
> You mean if I know which path to put into dflags, I can get it back out
> again?-)
>
> I was more hoping for a way to ask GHCi for *its libpath*, so that I can
> stuff that into a GHC API session *running in that GHCi*,
> and similarly for a GHC-compiled GHC API session.
I don't get it - why not just do 'ghc --print-libdir'? It sounds like GHCi
is a red herring here. You have to know the libdir regardless of whether
you're using the GHC API from within GHCi or in a compiled program.
> Btw, isn't the package processing code shared between
> GHC and ghc-pkg? It doesn't look as if the latter is a
> GHC API client at all..
The shared parts are in Cabal (the definition of InstalledPackageInfo and
suchlike).
Cheers,
Simon
More information about the Cvs-libraries
mailing list