
On Mon, 2013-03-18 at 12:43 +0000, Ian Lynagh wrote:
On Mon, Mar 18, 2013 at 12:34:16PM +0000, Duncan Coutts wrote:
Then you can have ghc-pkg depend on Cabal and use that for the human-readable bits, but since that's a program then it doesn't expose the Cabal lib dependency. Then ghc (and hence the ghc lib) would not depend on Cabal, but it would need a copy of the InstalledPackageInfo type and the other types that it uses.
Right, exactly. But we don't want to have 2 copies of the types, so could we move them into a Cabal-datatypes package which can be shared by both Cabal and GHC please?
That would be a rather annoying split. The cabal-lib package itself is supposed to be just types + parsers + pretty printers (& related utils). It'd end up looking like: cabal-types: types: InstalledPackageInfo, PackageName, Version, PackageId, InstalledPackageId, License cabal-lib: parser for InstalledPackageInfo, PackageName, Version, PackageId, InstalledPackageId, License modules Distribution.* cabal-build-simple: modules Distribution.Simple.* It's not as if one could frame this as a "the aspects of the Cabal spec that compilers need" because the other impls will want the parser + printers as well. Duncan