f949e4be7a
This way `configDependencies` works even when the Cabal version used by cabal-install is later than the one used by ghc-mod.
27 lines
771 B
Haskell
27 lines
771 B
Haskell
-- | ComponentLocalBuildInfo for Cabal >= 1.18
|
|
module Language.Haskell.GhcMod.Cabal18 (
|
|
ComponentLocalBuildInfo
|
|
, componentPackageDeps
|
|
) where
|
|
|
|
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)
|