cabal-install-solver-3.10.2.1: The command-line interface for Cabal and Hackage.
Safe HaskellNone
LanguageHaskell2010

Distribution.Solver.Types.PackageConstraint

Description

Per-package constraints. Package constraints must be respected by the solver. Multiple constraints for each package can be given, though obviously it is possible to construct conflicting constraints (eg impossible version range or inconsistent flag assignment).

Synopsis

Documentation

data ConstraintScope #

Determines to what packages and in what contexts a constraint applies.

Constructors

ScopeTarget PackageName

A scope that applies when the given package is used as a build target. In other words, the scope applies iff a goal has a top-level qualifier and its namespace matches the given package name. A namespace is considered to match a package name when it is either the default namespace (for --no-independent-goals) or it is an independent namespace with the given package name (for --independent-goals).

ScopeQualified Qualifier PackageName

The package with the specified name and qualifier.

ScopeAnySetupQualifier PackageName

The package with the specified name when it has a setup qualifier.

ScopeAnyQualifier PackageName

The package with the specified name regardless of qualifier.

scopeToplevel :: PackageName -> ConstraintScope #

Constructor for a common use case: the constraint applies to the package with the specified name when that package is a top-level dependency in the default namespace.

scopeToPackageName :: ConstraintScope -> PackageName #

Returns the package name associated with a constraint scope.

data PackageProperty #

A package property is a logical predicate on packages.

Instances

Instances details
Structured PackageProperty # 
Instance details

Defined in Distribution.Solver.Types.PackageConstraint

Generic PackageProperty # 
Instance details

Defined in Distribution.Solver.Types.PackageConstraint

Associated Types

type Rep PackageProperty 
Instance details

Defined in Distribution.Solver.Types.PackageConstraint

type Rep PackageProperty = D1 ('MetaData "PackageProperty" "Distribution.Solver.Types.PackageConstraint" "cabal-install-solver-3.10.2.1-7EKqj2ejRzx3mJ8Jjew2ej" 'False) ((C1 ('MetaCons "PackagePropertyVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VersionRange)) :+: C1 ('MetaCons "PackagePropertyInstalled" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PackagePropertySource" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PackagePropertyFlags" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FlagAssignment)) :+: C1 ('MetaCons "PackagePropertyStanzas" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [OptionalStanza])))))
Show PackageProperty # 
Instance details

Defined in Distribution.Solver.Types.PackageConstraint

Binary PackageProperty # 
Instance details

Defined in Distribution.Solver.Types.PackageConstraint

Eq PackageProperty # 
Instance details

Defined in Distribution.Solver.Types.PackageConstraint

type Rep PackageProperty # 
Instance details

Defined in Distribution.Solver.Types.PackageConstraint

type Rep PackageProperty = D1 ('MetaData "PackageProperty" "Distribution.Solver.Types.PackageConstraint" "cabal-install-solver-3.10.2.1-7EKqj2ejRzx3mJ8Jjew2ej" 'False) ((C1 ('MetaCons "PackagePropertyVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VersionRange)) :+: C1 ('MetaCons "PackagePropertyInstalled" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PackagePropertySource" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PackagePropertyFlags" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FlagAssignment)) :+: C1 ('MetaCons "PackagePropertyStanzas" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [OptionalStanza])))))

dispPackageProperty :: PackageProperty -> Doc #

Pretty-prints a package property.

data PackageConstraint #

A package constraint consists of a scope plus a property that must hold for all packages within that scope.

dispPackageConstraint :: PackageConstraint -> Doc #

Pretty-prints a package constraint.

showPackageConstraint :: PackageConstraint -> String #

Alternative textual representation of a package constraint for debugging purposes (slightly more verbose than that produced by dispPackageConstraint).