Cabal and GHC: the big picture
Oleg Grenrus
oleg.grenrus at iki.fi
Tue Jul 16 14:51:51 UTC 2024
Sure. But let's not be too nitpicky.
GHC indeed wants the "package.db" directory when you give it as
-package-db flag argument.
The directory of .conf files is though not what GHC reads, it reads the
cache file in that directory, i.e. package.cache file, so you can hack
together a tool (like ghc-pkg) which manages the package.cache file, and
then .conf files don't need to be in that directory at all.
I don't think it ever made sense to differentiate "cache file" from
"just conf files" and/or "conf files with interface and object files".
IIRC "ghc-pkg check" checks that interface files exists (or at least the
directories exist they should be in).
My point was that .cabal/store/<ghc>/package.db (or just
.cabal/store/<ghc> as it's not ambiguous here) are ordinary package
databases.
- Oleg
On 16.7.2024 15.19, Tom Ellis wrote:
> On Tue, Jul 16, 2024 at 02:51:07PM +0300, Oleg Grenrus wrote:
>> package.db directory has only .conf files, but those conf files point to
>> directories with interface and object files.
>> I think every tool puts the interface and object files next to .conf files.
> Right, but in principle I could do something different, couldn't I? I
> could take some subset of the .conf files in package.db, put them in a
> directory called /tmp/mynewpackagedatabase, and *that* would be a
> perfectly valid package database (as long as the files it points to
> still exist), wouldn't it?
>
> Tom
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
More information about the ghc-devs
mailing list