cabal-install-solver-3.12.1.0: The command-line interface for Cabal and Hackage.

Safe Haskell | None
Language | Haskell2010

Distribution.Solver.Types.PackagePath

Synopsis

- data PackagePath = PackagePath Namespace Qualifier
- data Namespace
  - = DefaultNamespace
  - | Independent PackageName
- data Qualifier
  - = QualToplevel
  - | QualBase PackageName
  - | QualSetup PackageName
  - | QualExe PackageName PackageName
- dispQualifier :: Qualifier -> Doc
- data Qualified a = Q PackagePath a
- type QPN = Qualified PackageName
- dispQPN :: QPN -> Doc
- showQPN :: QPN -> String

# Documentation

data PackagePath Source #

A package path consists of a namespace and a package path inside that namespace.

Constructors

PackagePath Namespace Qualifier |

#### Instances

Instances details

Show PackagePath Source # |
Instance details Defined in Distribution.Solver.Types.PackagePath Methods showsPrec :: Int -> PackagePath -> ShowS Source # show :: PackagePath -> String Source # showList :: [PackagePath] -> ShowS Source #
Eq PackagePath Source # |
Instance details Defined in Distribution.Solver.Types.PackagePath Methods (==) :: PackagePath -> PackagePath -> Bool Source # (/=) :: PackagePath -> PackagePath -> Bool Source #
Ord PackagePath Source # |

Instance details

Defined in Distribution.Solver.Types.PackagePath

Methods

compare :: PackagePath -> PackagePath -> Ordering Source #

(<) :: PackagePath -> PackagePath -> Bool Source #

(<=) :: PackagePath -> PackagePath -> Bool Source #

(>) :: PackagePath -> PackagePath -> Bool Source #

(>=) :: PackagePath -> PackagePath -> Bool Source #

max :: PackagePath -> PackagePath -> PackagePath Source #

min :: PackagePath -> PackagePath -> PackagePath Source #

data Namespace Source #

Top-level namespace

Package choices in different namespaces are considered completely independent by the solver.

Constructors

DefaultNamespace | The default namespace
Independent PackageName | A namespace for a specific build target

#### Instances

Instances details

Show Namespace Source # |
Instance details Defined in Distribution.Solver.Types.PackagePath Methods showsPrec :: Int -> Namespace -> ShowS Source # show :: Namespace -> String Source # showList :: [Namespace] -> ShowS Source #
Eq Namespace Source # |
Instance details Defined in Distribution.Solver.Types.PackagePath Methods (==) :: Namespace -> Namespace -> Bool Source # (/=) :: Namespace -> Namespace -> Bool Source #
Ord Namespace Source # |

Instance details

Defined in Distribution.Solver.Types.PackagePath

Methods

compare :: Namespace -> Namespace -> Ordering Source #

(<) :: Namespace -> Namespace -> Bool Source #

(<=) :: Namespace -> Namespace -> Bool Source #

(>) :: Namespace -> Namespace -> Bool Source #

(>=) :: Namespace -> Namespace -> Bool Source #

max :: Namespace -> Namespace -> Namespace Source #

min :: Namespace -> Namespace -> Namespace Source #

data Qualifier Source #

Qualifier of a package within a namespace (see `PackagePath`)

Constructors

QualToplevel | Top-level dependency in this namespace
QualBase PackageName | Any dependency on base is considered independent This makes it possible to have base shims.
QualSetup PackageName | Setup dependency By rights setup dependencies ought to be nestable; after all, the setup dependencies of a package might themselves have setup dependencies, which are independent from everything else. However, this very quickly leads to infinite search trees in the solver. Therefore we limit ourselves to a single qualifier (within a given namespace).

QualExe PackageName PackageName

If we depend on an executable from a package (via `build-tools`), we should solve for the dependencies of that package separately (since we're not going to actually try to link it.) We qualify for EACH package separately; e.g., ``Exe` pn1 pn2` qualifies the `build-tools` dependency on `pn2` from package `pn1`. (If we tracked only `pn1`, that would require a consistent dependency resolution for all of the depended upon executables from a package; if we tracked only `pn2`, that would require us to pick only one version of an executable over the entire install plan.)

#### Instances

Instances details

Show Qualifier Source # |
Instance details Defined in Distribution.Solver.Types.PackagePath Methods showsPrec :: Int -> Qualifier -> ShowS Source # show :: Qualifier -> String Source # showList :: [Qualifier] -> ShowS Source #
Eq Qualifier Source # |
Instance details Defined in Distribution.Solver.Types.PackagePath Methods (==) :: Qualifier -> Qualifier -> Bool Source # (/=) :: Qualifier -> Qualifier -> Bool Source #
Ord Qualifier Source # |

Instance details

Defined in Distribution.Solver.Types.PackagePath

Methods

compare :: Qualifier -> Qualifier -> Ordering Source #

(<) :: Qualifier -> Qualifier -> Bool Source #

(<=) :: Qualifier -> Qualifier -> Bool Source #

(>) :: Qualifier -> Qualifier -> Bool Source #

(>=) :: Qualifier -> Qualifier -> Bool Source #

max :: Qualifier -> Qualifier -> Qualifier Source #

min :: Qualifier -> Qualifier -> Qualifier Source #

dispQualifier :: Qualifier -> Doc Source #

Pretty-prints a qualifier. The result is either empty or ends in a period, so it can be prepended onto a package name.

NOTE: the base qualifier is for a dependency _on_ base; the qualifier is there to make sure different dependencies on base are all independent. So we want to print something like `"A.base"`, where the `"A."` part is the qualifier and `"base"` is the actual dependency (which, for the `Base` qualifier, will always be `base`).

data Qualified a Source #

A qualified entity. Pairs a package path with the entity.

Constructors

Q PackagePath a |

#### Instances

Instances details

Show a => Show (Qualified a) Source # |
Instance details Defined in Distribution.Solver.Types.PackagePath Methods showsPrec :: Int -> Qualified a -> ShowS Source # show :: Qualified a -> String Source # showList :: [Qualified a] -> ShowS Source #
Eq a => Eq (Qualified a) Source # |
Instance details Defined in Distribution.Solver.Types.PackagePath Methods (==) :: Qualified a -> Qualified a -> Bool Source # (/=) :: Qualified a -> Qualified a -> Bool Source #
Ord a => Ord (Qualified a) Source # |

Instance details

Defined in Distribution.Solver.Types.PackagePath

Methods

compare :: Qualified a -> Qualified a -> Ordering Source #

(<) :: Qualified a -> Qualified a -> Bool Source #

(<=) :: Qualified a -> Qualified a -> Bool Source #

(>) :: Qualified a -> Qualified a -> Bool Source #

(>=) :: Qualified a -> Qualified a -> Bool Source #

max :: Qualified a -> Qualified a -> Qualified a Source #

min :: Qualified a -> Qualified a -> Qualified a Source #

type QPN = Qualified PackageName Source #

Qualified package name.

dispQPN :: QPN -> Doc Source #

Pretty-prints a qualified package name.

showQPN :: QPN -> String Source #

String representation of a qualified package name.