Copy ComponentLocalBuildInfo from Cabal-1.18

This way `configDependencies` works even when the Cabal version used by
cabal-install is later than the one used by ghc-mod.
This commit is contained in:
Daniel Gröber
2014-05-10 02:04:09 +02:00
parent 13930a9d7d
commit f949e4be7a
2 changed files with 22 additions and 2 deletions

View File

@@ -4,4 +4,23 @@ module Language.Haskell.GhcMod.Cabal18 (
, componentPackageDeps
) where
import Distribution.Simple.LocalBuildInfo (ComponentLocalBuildInfo(..))
import Distribution.Package (InstalledPackageId, PackageId)
data LibraryName = LibraryName String
deriving (Read, Show)
data ComponentLocalBuildInfo
= LibComponentLocalBuildInfo {
componentPackageDeps :: [(InstalledPackageId, PackageId)],
componentLibraries :: [LibraryName]
}
| ExeComponentLocalBuildInfo {
componentPackageDeps :: [(InstalledPackageId, PackageId)]
}
| TestComponentLocalBuildInfo {
componentPackageDeps :: [(InstalledPackageId, PackageId)]
}
| BenchComponentLocalBuildInfo {
componentPackageDeps :: [(InstalledPackageId, PackageId)]
}
deriving (Read, Show)