What is the relationship between ghc-pkg and cabal?
해결책
Graphically, the dependencies are:
Packages GHC can use
|
Are registered with "ghc-pkg register"
|
And (almost always) built with Cabal
|
With build dependencies resolved by cabal-install
|
From Hackage.
다른 팁
ghc-pkg is a direct interface to GHC's package database. Cabal is a tool that provides a consistent distribution structure for packages and a way to specify metadata such as dependencies between packages, version numbers, and build information.
Using Cabal to install a package will register it with ghc for you (among other things), but that's the extent of the overlap, really.
Note that ghc-pkg also provides functionality that (as far as I know) Cabal doesn't, such as hiding installed packages.
제휴하지 않습니다 StackOverflow