Commit b63ebe1b authored by John Ericson's avatar John Ericson Committed by John Ericson
Browse files

Make more dependency types, and PkgconfigName

    Plain `Dependency` should strictly refer to a Haskell Package, usually the
    library component of that package.
parent ad1b3e4c
......@@ -143,6 +143,7 @@ library
Distribution.Make
Distribution.ModuleName
Distribution.Package
Distribution.Package.TextClass
Distribution.PackageDescription
Distribution.PackageDescription.Check
Distribution.PackageDescription.Configuration
......
......@@ -52,8 +52,8 @@ toComponentsGraph enabled pkg_descr =
-- The dependencies for the given component
componentDeps component =
[ CExeName toolname
| Dependency pkgname _ <- buildTools bi
, let toolname = packageNameToUnqualComponentName pkgname
| LegacyExeDependency name _ <- buildTools bi
, let toolname = mkUnqualComponentName name
, toolname `elem` map exeName (executables pkg_descr) ]
++ [ if pkgname == packageName pkg_descr
......
......@@ -140,9 +140,8 @@ toConfiguredComponent pkg_descr this_cid
| otherwise
= Map.toList external_lib_map
exe_deps = [ cid
| Dependency pkgname _ <- buildTools bi
, let name = packageNameToUnqualComponentName pkgname
, Just cid <- [ Map.lookup name exe_map ] ]
| LegacyExeDependency name _ <- buildTools bi
, Just cid <- [ Map.lookup (mkUnqualComponentName name) exe_map ] ]
-- | Also computes the 'ComponentId', and sets cc_public if necessary.
-- This is Cabal-only; cabal-install won't use this.
......
......@@ -49,6 +49,7 @@ import Distribution.Compat.Prelude
import Distribution.ParseUtils
import Distribution.License
import Distribution.Package hiding (installedUnitId, installedPackageId)
import Distribution.Package.TextClass ()
import Distribution.Backpack
import qualified Distribution.Package as Package
import Distribution.ModuleName
......
......@@ -23,6 +23,7 @@ module Distribution.Package (
packageNameToUnqualComponentName, unqualComponentNameToPackageName,
PackageIdentifier(..),
PackageId,
PkgconfigName, unPkgconfigName, mkPkgconfigName,
-- * Package keys/installed package IDs (used for linker symbols)
ComponentId, unComponentId, mkComponentId,
......@@ -43,6 +44,8 @@ module Distribution.Package (
-- * Package source dependencies
Dependency(..),
LegacyExeDependency(..),
PkgconfigDependency(..),
thisPackageVersion,
notThisPackageVersion,
simplifyDependency,
......@@ -59,7 +62,7 @@ import Distribution.Compat.Prelude
import Distribution.Utils.ShortText
import Distribution.Version
( Version, VersionRange, anyVersion, thisVersion
( Version, VersionRange, thisVersion
, notThisVersion, simplifyVersionRange
, nullVersion )
......@@ -69,7 +72,7 @@ import Distribution.Compat.ReadP
import Distribution.Text
import Distribution.ModuleName
import Text.PrettyPrint ((<+>), text)
import Text.PrettyPrint (text)
-- | An unqualified component name, for any kind of component.
--
......@@ -175,6 +178,44 @@ instance Text PackageName where
instance NFData PackageName where
rnf (PackageName pkg) = rnf pkg
-- | A pkg-config library name
--
-- This is parsed as any valid argument to the pkg-config utility.
--
-- @since 2.0
newtype PkgconfigName = PkgconfigName ShortText
deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
-- | Convert 'PkgconfigName' to 'String'
--
-- @since 2.0
unPkgconfigName :: PkgconfigName -> String
unPkgconfigName (PkgconfigName s) = fromShortText s
-- | Construct a 'PkgconfigName' from a 'String'
--
-- 'mkPkgconfigName' is the inverse to 'unPkgconfigName'
--
-- Note: No validations are performed to ensure that the resulting
-- 'PkgconfigName' is valid
--
-- @since 2.0
mkPkgconfigName :: String -> PkgconfigName
mkPkgconfigName = PkgconfigName . toShortText
instance Binary PkgconfigName
-- pkg-config allows versions and other letters in package names, eg
-- "gtk+-2.0" is a valid pkg-config package _name_. It then has a package
-- version number like 2.10.13
instance Text PkgconfigName where
disp = Disp.text . unPkgconfigName
parse = mkPkgconfigName
<$> munch1 (\c -> isAlphaNum c || c `elem` "+-._")
instance NFData PkgconfigName where
rnf (PkgconfigName pkg) = rnf pkg
-- | Type alias so we can use the shorter name PackageId.
type PackageId = PackageIdentifier
......@@ -354,19 +395,33 @@ mkLegacyUnitId = newSimpleUnitId . mkComponentId . display
data Dependency = Dependency PackageName VersionRange
deriving (Generic, Read, Show, Eq, Typeable, Data)
instance Binary Dependency
-- | Describes a legacy `build-tools`-style dependency on an executable
--
-- It is "legacy" because we do not know what the build-tool referred to. It
-- could refer to a pkg-config executable (PkgconfigName), or an internal
-- executable (UnqualComponentName). Thus the name is stringly typed.
--
-- @since 2.0
data LegacyExeDependency = LegacyExeDependency
String
VersionRange
deriving (Generic, Read, Show, Eq, Typeable, Data)
instance Text Dependency where
disp (Dependency name ver) =
disp name <+> disp ver
-- | Describes a dependency on a pkg-config library
--
-- @since 2.0
data PkgconfigDependency = PkgconfigDependency
PkgconfigName
VersionRange
deriving (Generic, Read, Show, Eq, Typeable, Data)
parse = do name <- parse
Parse.skipSpaces
ver <- parse <++ return anyVersion
Parse.skipSpaces
return (Dependency name ver)
instance Binary Dependency
instance Binary LegacyExeDependency
instance Binary PkgconfigDependency
instance NFData Dependency where rnf = genericRnf
instance NFData LegacyExeDependency where rnf = genericRnf
instance NFData PkgconfigDependency where rnf = genericRnf
thisPackageVersion :: PackageIdentifier -> Dependency
thisPackageVersion (PackageIdentifier n v) =
......
-- | *Dependency Text instances moved from Distribution.Package
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Distribution.Package.TextClass () where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Package
import Distribution.ParseUtils
import Distribution.Version (anyVersion)
import qualified Distribution.Compat.ReadP as Parse
import qualified Text.PrettyPrint as Disp
import Distribution.Compat.ReadP
import Distribution.Text
import Text.PrettyPrint ((<+>))
instance Text Dependency where
disp (Dependency name ver) =
disp name <+> disp ver
parse = do name <- parse
Parse.skipSpaces
ver <- parse <++ return anyVersion
Parse.skipSpaces
return (Dependency name ver)
instance Text LegacyExeDependency where
disp (LegacyExeDependency name ver) =
Disp.text name <+> disp ver
parse = do name <- parseMaybeQuoted parseBuildToolName
Parse.skipSpaces
ver <- parse <++ return anyVersion
Parse.skipSpaces
return $ LegacyExeDependency name ver
where
-- like parsePackageName but accepts symbols in components
parseBuildToolName :: Parse.ReadP r String
parseBuildToolName = do ns <- sepBy1 component (Parse.char '-')
return (intercalate "-" ns)
where component = do
cs <- munch1 (\c -> isAlphaNum c || c == '+' || c == '_')
if all isDigit cs then pfail else return cs
instance Text PkgconfigDependency where
disp (PkgconfigDependency name ver) =
disp name <+> disp ver
parse = do name <- parse
Parse.skipSpaces
ver <- parse <++ return anyVersion
Parse.skipSpaces
return $ PkgconfigDependency name ver
......@@ -55,6 +55,7 @@ import Distribution.ParseUtils hiding (parseFields)
import Distribution.PackageDescription
import Distribution.PackageDescription.Utils
import Distribution.Package
import Distribution.Package.TextClass ()
import Distribution.ModuleName
import Distribution.Version
import Distribution.Verbosity
......@@ -407,7 +408,7 @@ binfoFieldDescrs =
[ boolField "buildable"
buildable (\val binfo -> binfo{buildable=val})
, commaListField "build-tools"
disp parseBuildTool
disp parse
buildTools (\xs binfo -> binfo{buildTools=xs})
, commaListFieldWithSep vcat "build-depends"
disp parse
......@@ -425,7 +426,7 @@ binfoFieldDescrs =
showToken parseTokenQ'
ldOptions (\val binfo -> binfo{ldOptions=val})
, commaListField "pkgconfig-depends"
disp parsePkgconfigDependency
disp parse
pkgconfigDepends (\xs binfo -> binfo{pkgconfigDepends=xs})
, listField "frameworks"
showToken parseTokenQ
......
......@@ -41,6 +41,7 @@ import qualified Distribution.Compat.Parsec as Parsec
import Distribution.Compiler (CompilerFlavor (..))
import Distribution.ModuleName (ModuleName)
import Distribution.Package
import Distribution.Package.TextClass ()
import Distribution.PackageDescription
import Distribution.Types.ForeignLib
import Distribution.Parsec.Class
......@@ -415,7 +416,7 @@ binfoFieldDescrs =
[ boolField "buildable"
buildable (\val binfo -> binfo{buildable=val})
, commaListField "build-tools"
disp parsecBuildTool
disp parsec
buildTools (\xs binfo -> binfo{buildTools=xs})
, commaListFieldWithSep vcat "build-depends"
disp parsec
......@@ -433,7 +434,7 @@ binfoFieldDescrs =
showToken parsecToken'
ldOptions (\val binfo -> binfo{ldOptions=val})
, commaListField "pkgconfig-depends"
disp parsecPkgconfigDependency
disp parsec
pkgconfigDepends (\xs binfo -> binfo{pkgconfigDepends=xs})
, listField "frameworks"
showToken parsecToken
......
......@@ -28,14 +28,14 @@ module Distribution.ParseUtils (
showFields, showSingleNamedField, showSimpleSingleNamedField,
parseFields, parseFieldsFlat,
parseFilePathQ, parseTokenQ, parseTokenQ',
parseModuleNameQ, parseBuildTool, parsePkgconfigDependency,
parseModuleNameQ,
parseOptVersion, parsePackageNameQ,
parseTestedWithQ, parseLicenseQ, parseLanguageQ, parseExtensionQ,
parseSepList, parseCommaList, parseOptCommaList,
showFilePath, showToken, showTestedWith, showFreeText, parseFreeText,
field, simpleField, listField, listFieldWithSep, spaceListField,
commaListField, commaListFieldWithSep, commaNewLineListField,
optsField, liftField, boolField, parseQuoted, indentWith,
optsField, liftField, boolField, parseQuoted, parseMaybeQuoted, indentWith,
UnrecFieldParser, warnUnrec, ignoreUnrec,
) where
......@@ -625,33 +625,6 @@ betweenSpaces act = do skipSpaces
skipSpaces
return res
parseBuildTool :: ReadP r Dependency
parseBuildTool = do name <- parseBuildToolNameQ
ver <- betweenSpaces $
parse <++ return anyVersion
return $ Dependency name ver
parseBuildToolNameQ :: ReadP r PackageName
parseBuildToolNameQ = parseMaybeQuoted parseBuildToolName
-- like parsePackageName but accepts symbols in components
parseBuildToolName :: ReadP r PackageName
parseBuildToolName = do ns <- sepBy1 component (ReadP.char '-')
return (mkPackageName (intercalate "-" ns))
where component = do
cs <- munch1 (\c -> isAlphaNum c || c == '+' || c == '_')
if all isDigit cs then pfail else return cs
-- pkg-config allows versions and other letters in package names,
-- eg "gtk+-2.0" is a valid pkg-config package _name_.
-- It then has a package version number like 2.10.13
parsePkgconfigDependency :: ReadP r Dependency
parsePkgconfigDependency = do name <- munch1
(\c -> isAlphaNum c || c `elem` "+-._")
ver <- betweenSpaces $
parse <++ return anyVersion
return $ Dependency (mkPackageName name) ver
parsePackageNameQ :: ReadP r PackageName
parsePackageNameQ = parseMaybeQuoted parse
......
......@@ -5,8 +5,6 @@ module Distribution.Parsec.Class (
parsecWarning,
-- * Utilities
parsecTestedWith,
parsecPkgconfigDependency,
parsecBuildTool,
parsecToken,
parsecToken',
parsecFilePath,
......@@ -35,8 +33,10 @@ import Distribution.ModuleName (ModuleName)
import qualified Distribution.ModuleName as ModuleName
import Distribution.Package
(Dependency (..),
LegacyExeDependency (..), PkgconfigDependency (..),
UnqualComponentName, mkUnqualComponentName,
PackageName, mkPackageName)
PackageName, mkPackageName,
PkgconfigName, mkPkgconfigName)
import Distribution.System
(Arch (..), ClassificationStrictness (..), OS (..),
classifyArch, classifyOS)
......@@ -105,6 +105,9 @@ instance Parsec UnqualComponentName where
instance Parsec PackageName where
parsec = mkPackageName <$> parsecUnqualComponentName
instance Parsec PkgconfigName where
parsec = mkPkgconfigName <$> P.munch1 (\c -> isAlphaNum c || c `elem` "+-._")
instance Parsec ModuleName where
parsec = ModuleName.fromComponents <$> P.sepBy1 component (P.char '.')
where
......@@ -130,6 +133,25 @@ instance Parsec Dependency where
ver <- parsec <|> pure anyVersion
return (Dependency name ver)
instance Parsec LegacyExeDependency where
parsec = do
name <- parsecMaybeQuoted nameP
P.spaces
verRange <- parsecMaybeQuoted parsec <|> pure anyVersion
pure $ LegacyExeDependency name verRange
where
nameP = intercalate "-" <$> P.sepBy1 component (P.char '-')
component = do
cs <- P.munch1 (\c -> isAlphaNum c || c == '+' || c == '_')
if all isDigit cs then fail "invalid component" else return cs
instance Parsec PkgconfigDependency where
parsec = do
name <- parsec
P.spaces
verRange <- parsec <|> pure anyVersion
pure $ PkgconfigDependency name verRange
instance Parsec Version where
parsec = mkVersion <$>
P.sepBy1 P.integral (P.char '.')
......@@ -346,25 +368,6 @@ parsecTestedWith = do
ver <- parsec <|> pure anyVersion
return (name, ver)
parsecPkgconfigDependency :: P.Stream s Identity Char => P.Parsec s [PWarning] Dependency
parsecPkgconfigDependency = do
name <- P.munch1 (\c -> isAlphaNum c || c `elem` "+-._")
P.spaces
verRange <- parsec <|> pure anyVersion
pure $ Dependency (mkPackageName name) verRange
parsecBuildTool :: P.Stream s Identity Char => P.Parsec s [PWarning] Dependency
parsecBuildTool = do
name <- parsecMaybeQuoted nameP
P.spaces
verRange <- parsecMaybeQuoted parsec <|> pure anyVersion
pure $ Dependency (mkPackageName name) verRange
where
nameP = intercalate "-" <$> P.sepBy1 component (P.char '-')
component = do
cs <- P.munch1 (\c -> isAlphaNum c || c == '+' || c == '_')
if all isDigit cs then fail "invalid component" else return cs
parsecToken :: P.Stream s Identity Char => P.Parsec s [PWarning] String
parsecToken = parsecHaskellString <|> (P.munch1 (\x -> not (isSpace x) && x /= ',') P.<?> "identifier" )
......
......@@ -538,7 +538,7 @@ addInternalBuildTools pkg lbi bi progs =
internalExeNames = map (unUnqualComponentName . exeName) (executables pkg)
buildToolNames = map buildToolName (buildTools bi)
where
buildToolName (Dependency pname _ ) = unPackageName pname
buildToolName (LegacyExeDependency pname _) = pname
-- TODO: build separate libs in separate dirs so that we can build
......
......@@ -565,10 +565,10 @@ configure (pkg_descr0', pbi) cfg = do
[ buildTool
| let exeNames = map (unUnqualComponentName . exeName) (executables pkg_descr)
, bi <- enabledBuildInfos pkg_descr enabled
, buildTool@(Dependency toolPName reqVer)
, buildTool@(LegacyExeDependency toolPName reqVer)
<- buildTools bi
, let isInternal =
unPackageName toolPName `elem` exeNames
toolPName `elem` exeNames
-- we assume all internal build-tools are
-- versioned with the package:
&& packageVersion pkg_descr `withinRange` reqVer
......@@ -1364,7 +1364,7 @@ combinedConstraints constraints dependencies installedPackages = do
-- -----------------------------------------------------------------------------
-- Configuring program dependencies
configureRequiredPrograms :: Verbosity -> [Dependency] -> ProgramDb
configureRequiredPrograms :: Verbosity -> [LegacyExeDependency] -> ProgramDb
-> IO ProgramDb
configureRequiredPrograms verbosity deps progdb =
foldM (configureRequiredProgram verbosity) progdb deps
......@@ -1375,10 +1375,10 @@ configureRequiredPrograms verbosity deps progdb =
-- known (exists in the input 'ProgramDb'), we will make sure that the
-- program matches the required version; otherwise we will accept
-- any version of the program and assume that it is a simpleProgram.
configureRequiredProgram :: Verbosity -> ProgramDb -> Dependency
configureRequiredProgram :: Verbosity -> ProgramDb -> LegacyExeDependency
-> IO ProgramDb
configureRequiredProgram verbosity progdb
(Dependency progPkgName verRange) =
(LegacyExeDependency progName verRange) =
case lookupKnownProgram progName progdb of
Nothing ->
-- Try to configure it as a 'simpleProgram' automatically
......@@ -1428,8 +1428,6 @@ configureRequiredProgram verbosity progdb
| otherwise -> do
(_, _, progdb') <- requireProgramVersion verbosity prog verRange progdb
return progdb'
where
progName = unPackageName progPkgName
-- -----------------------------------------------------------------------------
-- Configuring pkg-config package dependencies
......@@ -1459,7 +1457,7 @@ configurePkgconfigPackages verbosity pkg_descr progdb enabled
pkgconfig = getDbProgramOutput (lessVerbose verbosity)
pkgConfigProgram progdb
requirePkg dep@(Dependency pkgn range) = do
requirePkg dep@(PkgconfigDependency pkgn range) = do
version <- pkgconfig ["--modversion", pkg]
`catchIO` (\_ -> die notFound)
`catchExit` (\_ -> die notFound)
......@@ -1482,7 +1480,7 @@ configurePkgconfigPackages verbosity pkg_descr progdb enabled
| isAnyVersion range = ""
| otherwise = " version " ++ display range
pkg = unPackageName pkgn
pkg = unPkgconfigName pkgn
-- Adds pkgconfig dependencies to the build info for a component
addPkgConfigBI compBI setCompBI comp = do
......@@ -1505,10 +1503,10 @@ configurePkgconfigPackages verbosity pkg_descr progdb enabled
addPkgConfigBIBench = addPkgConfigBI benchmarkBuildInfo $
\bench bi -> bench { benchmarkBuildInfo = bi }
pkgconfigBuildInfo :: [Dependency] -> NoCallStackIO BuildInfo
pkgconfigBuildInfo :: [PkgconfigDependency] -> NoCallStackIO BuildInfo
pkgconfigBuildInfo [] = return mempty
pkgconfigBuildInfo pkgdeps = do
let pkgs = nub [ display pkg | Dependency pkg _ <- pkgdeps ]
let pkgs = nub [ display pkg | PkgconfigDependency pkg _ <- pkgdeps ]
ccflags <- pkgconfig ("--cflags" : pkgs)
ldflags <- pkgconfig ("--libs" : pkgs)
return (ccLdOptionsBuildInfo (words ccflags) (words ldflags))
......
......@@ -85,6 +85,7 @@ import qualified Distribution.Compat.ReadP as Parse
import qualified Text.PrettyPrint as Disp
import Distribution.ModuleName
import Distribution.Package
import Distribution.Package.TextClass ()
import Distribution.PackageDescription hiding (Flag)
import Distribution.Simple.Command hiding (boolOpt, boolOpt')
import qualified Distribution.Simple.Command as Command
......
......@@ -27,11 +27,11 @@ import Language.Haskell.Extension
-- Consider refactoring into executable and library versions.
data BuildInfo = BuildInfo {
buildable :: Bool, -- ^ component is buildable here
buildTools :: [Dependency], -- ^ tools needed to build this bit
buildTools :: [LegacyExeDependency], -- ^ tools needed to build this bit
cppOptions :: [String], -- ^ options for pre-processing Haskell code
ccOptions :: [String], -- ^ options for C compiler
ldOptions :: [String], -- ^ options for linker
pkgconfigDepends :: [Dependency], -- ^ pkg-config packages that are used
pkgconfigDepends :: [PkgconfigDependency], -- ^ pkg-config packages that are used
frameworks :: [String], -- ^support frameworks for Mac OS X
extraFrameworkDirs:: [String], -- ^ extra locations to find frameworks.
cSources :: [FilePath],
......
......@@ -29,7 +29,8 @@ module Distribution.Client.PackageHash (
) where
import Distribution.Package
( PackageId, PackageName, PackageIdentifier(..), mkComponentId )
( PackageId, PackageIdentifier(..), mkComponentId
, PkgconfigName )
import Distribution.System
( Platform, OS(Windows), buildOS )
import Distribution.PackageDescription
......@@ -139,7 +140,7 @@ data PackageHashInputs = PackageHashInputs {
pkgHashPkgId :: PackageId,
pkgHashComponent :: Maybe CD.Component,
pkgHashSourceHash :: PackageSourceHash,
pkgHashPkgConfigDeps :: Set (PackageName, Maybe Version),
pkgHashPkgConfigDeps :: Set (PkgconfigName, Maybe Version),
pkgHashDirectDeps :: Set InstalledPackageId,
pkgHashOtherConfig :: PackageHashConfigInputs
}
......
......@@ -1270,7 +1270,7 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB
++ display pn ++ " from "
++ display (elabPkgSourceId elab1))
(pkgConfigDbPkgVersion pkgConfigDB pn))
| Dependency pn _ <- PD.pkgconfigDepends bi ]
| PkgconfigDependency pn _ <- PD.pkgconfigDepends bi ]
compSetupDependencies = concatMap (elaborateLibSolverId mapDep) (CD.setupDeps deps0)
......@@ -1429,8 +1429,8 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB
$ [ (pn, fromMaybe (error $ "pkgPkgConfigDependencies: impossible! "
++ display pn ++ " from " ++ display pkgid)
(pkgConfigDbPkgVersion pkgConfigDB pn))
| Dependency pn _ <- concatMap PD.pkgconfigDepends
(PD.allBuildInfo elabPkgDescription)
| PkgconfigDependency pn _ <- concatMap PD.pkgconfigDepends
(PD.allBuildInfo elabPkgDescription)
]
-- Filled in later
......
......@@ -371,7 +371,7 @@ elabSetupDependencies elab =
ElabPackage pkg -> CD.setupDeps (pkgLibDependencies pkg)
ElabComponent comp -> compSetupDependencies comp
elabPkgConfigDependencies :: ElaboratedConfiguredPackage -> [(PackageName, Maybe Version)]
elabPkgConfigDependencies :: ElaboratedConfiguredPackage -> [(PkgconfigName, Maybe Version)]
elabPkgConfigDependencies ElaboratedConfiguredPackage { elabPkgOrComp = ElabPackage pkg }
= pkgPkgConfigDependencies pkg
elabPkgConfigDependencies ElaboratedConfiguredPackage { elabPkgOrComp = ElabComponent comp }
......@@ -404,7 +404,7 @@ data ElaboratedComponent
-- internal executables).
compExeDependencies :: [ComponentId],
-- | The @pkg-config@ dependencies of the component
compPkgConfigDependencies :: [(PackageName, Maybe Version)],
compPkgConfigDependencies :: [(PkgconfigName, Maybe Version)],
-- | The paths all our executable dependencies will be installed
-- to once they are installed.
compExeDependencyPaths :: [FilePath],
......@@ -454,7 +454,7 @@ data ElaboratedPackage
-- because Cabal library does not track per-component
-- pkg-config depends; it always does them all at once.
--
pkgPkgConfigDependencies :: [(PackageName, Maybe Version)],
pkgPkgConfigDependencies :: [(PkgconfigName, Maybe Version)],
-- | Which optional stanzas (ie testsuites, benchmarks) will actually
-- be enabled during the package configure step.
......
......@@ -31,6 +31,8 @@ module Distribution.Client.World (
import Distribution.Package
( Dependency(..) )
import Distribution.Package.TextClass
()
import Distribution.PackageDescription
( FlagAssignment, mkFlagName, unFlagName )
import Distribution.Verbosity
......
......@@ -65,7 +65,7 @@ data PreAssignment = PA PPreAssignment FAssignment SAssignment
-- or the successfully extended assignment.
extend :: (Extension -> Bool) -- ^ is a given extension supported
-> (Language -> Bool) -- ^ is a given language supported
-> (PN -> VR -> Bool) -- ^ is a given pkg-config requirement satisfiable
-> (PkgconfigName -> VR -> Bool) -- ^ is a given pkg-config requirement satisfiable
-> Var QPN
-> PPreAssignment -> [Dep QPN] -> Either (ConflictSet QPN, [Dep QPN]) PPreAssignment
extend extSupported langSupported pkgPresent var = foldM extendSingle
......