cabal-install-solver-3.8.1.0: The command-line interface for Cabal and Hackage.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Distribution.Solver.Modular.Package

Synopsis

Documentation

data I Source #

Instance. A version number and a location.

Constructors

I Ver Loc 

Instances

Instances details
Show I Source # 
Instance details

Defined in Distribution.Solver.Modular.Package

Methods

showsPrec :: Int -> I -> ShowS Source #

show :: I -> String Source #

showList :: [I] -> ShowS Source #

Eq I Source # 
Instance details

Defined in Distribution.Solver.Modular.Package

Methods

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

(/=) :: I -> I -> Bool Source #

Ord I Source # 
Instance details

Defined in Distribution.Solver.Modular.Package

Methods

compare :: I -> I -> Ordering Source #

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

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

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

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

max :: I -> I -> I Source #

min :: I -> I -> I Source #

data Loc Source #

Location. Info about whether a package is installed or not, and where exactly it is located. For installed packages, uniquely identifies the package instance via its PId.

TODO: More information is needed about the repo.

Constructors

Inst PId 
InRepo 

Instances

Instances details
Show Loc Source # 
Instance details

Defined in Distribution.Solver.Modular.Package

Eq Loc Source # 
Instance details

Defined in Distribution.Solver.Modular.Package

Methods

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

(/=) :: Loc -> Loc -> Bool Source #

Ord Loc Source # 
Instance details

Defined in Distribution.Solver.Modular.Package

Methods

compare :: Loc -> Loc -> Ordering Source #

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

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

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

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

max :: Loc -> Loc -> Loc Source #

min :: Loc -> Loc -> Loc Source #

type PackageId = PackageIdentifier Source #

Type alias so we can use the shorter name PackageId.

data PackageIdentifier Source #

The name and version of a package.

Constructors

PackageIdentifier 

Fields

Instances

Instances details
Package PackageIdentifier 
Instance details

Defined in Distribution.Package

Parsec PackageIdentifier
>>> simpleParsec "foo-bar-0" :: Maybe PackageIdentifier
Just (PackageIdentifier {pkgName = PackageName "foo-bar", pkgVersion = mkVersion [0]})
>>> simpleParsec "foo-bar" :: Maybe PackageIdentifier
Just (PackageIdentifier {pkgName = PackageName "foo-bar", pkgVersion = mkVersion []})

Note: Stricter than Text instance

>>> simpleParsec "foo-bar-0-0" :: Maybe PackageIdentifier
Nothing
>>> simpleParsec "foo-bar.0" :: Maybe PackageIdentifier
Nothing
>>> simpleParsec "foo-bar.4-2" :: Maybe PackageIdentifier
Nothing
>>> simpleParsec "1.2.3" :: Maybe PackageIdentifier
Nothing
Instance details

Defined in Distribution.Types.PackageId

Pretty PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Structured PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Data PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PackageIdentifier -> c PackageIdentifier Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PackageIdentifier Source #

toConstr :: PackageIdentifier -> Constr Source #

dataTypeOf :: PackageIdentifier -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PackageIdentifier) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PackageIdentifier) Source #

gmapT :: (forall b. Data b => b -> b) -> PackageIdentifier -> PackageIdentifier Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PackageIdentifier -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PackageIdentifier -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> PackageIdentifier -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PackageIdentifier -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier Source #

Generic PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Associated Types

type Rep PackageIdentifier :: Type -> Type Source #

Read PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Show PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Binary PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

NFData PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Methods

rnf :: PackageIdentifier -> () Source #

Eq PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Ord PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

type Rep PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

type Rep PackageIdentifier = D1 ('MetaData "PackageIdentifier" "Distribution.Types.PackageId" "Cabal-syntax-3.8.1.0" 'False) (C1 ('MetaCons "PackageIdentifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "pkgName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageName) :*: S1 ('MetaSel ('Just "pkgVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)))

data PackageName Source #

A package name.

Use mkPackageName and unPackageName to convert from/to a String.

This type is opaque since Cabal-2.0

Since: Cabal-syntax-2.0.0.2

Instances

Instances details
Parsec PackageName 
Instance details

Defined in Distribution.Types.PackageName

Pretty PackageName 
Instance details

Defined in Distribution.Types.PackageName

Structured PackageName 
Instance details

Defined in Distribution.Types.PackageName

Data PackageName 
Instance details

Defined in Distribution.Types.PackageName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PackageName -> c PackageName Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PackageName Source #

toConstr :: PackageName -> Constr Source #

dataTypeOf :: PackageName -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PackageName) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PackageName) Source #

gmapT :: (forall b. Data b => b -> b) -> PackageName -> PackageName Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PackageName -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PackageName -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> PackageName -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PackageName -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName Source #

IsString PackageName

mkPackageName

Since: Cabal-syntax-2.0.0.2

Instance details

Defined in Distribution.Types.PackageName

Generic PackageName 
Instance details

Defined in Distribution.Types.PackageName

Associated Types

type Rep PackageName :: Type -> Type Source #

Read PackageName 
Instance details

Defined in Distribution.Types.PackageName

Show PackageName 
Instance details

Defined in Distribution.Types.PackageName

Binary PackageName 
Instance details

Defined in Distribution.Types.PackageName

NFData PackageName 
Instance details

Defined in Distribution.Types.PackageName

Methods

rnf :: PackageName -> () Source #

Eq PackageName 
Instance details

Defined in Distribution.Types.PackageName

Ord PackageName 
Instance details

Defined in Distribution.Types.PackageName

type Rep PackageName 
Instance details

Defined in Distribution.Types.PackageName

type Rep PackageName = D1 ('MetaData "PackageName" "Distribution.Types.PackageName" "Cabal-syntax-3.8.1.0" 'True) (C1 ('MetaCons "PackageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

mkPackageName :: String -> PackageName Source #

Construct a PackageName from a String

mkPackageName is the inverse to unPackageName

Note: No validations are performed to ensure that the resulting PackageName is valid

Since: Cabal-syntax-2.0.0.2

data PkgconfigName Source #

A pkg-config library name

This is parsed as any valid argument to the pkg-config utility.

Since: Cabal-syntax-2.0.0.2

Instances

Instances details
Parsec PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Pretty PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Structured PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Data PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PkgconfigName -> c PkgconfigName Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PkgconfigName Source #

toConstr :: PkgconfigName -> Constr Source #

dataTypeOf :: PkgconfigName -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PkgconfigName) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PkgconfigName) Source #

gmapT :: (forall b. Data b => b -> b) -> PkgconfigName -> PkgconfigName Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PkgconfigName -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PkgconfigName -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> PkgconfigName -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PkgconfigName -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PkgconfigName -> m PkgconfigName Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PkgconfigName -> m PkgconfigName Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PkgconfigName -> m PkgconfigName Source #

IsString PkgconfigName

mkPkgconfigName

Since: Cabal-syntax-2.0.0.2

Instance details

Defined in Distribution.Types.PkgconfigName

Generic PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Associated Types

type Rep PkgconfigName :: Type -> Type Source #

Read PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Show PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Binary PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

NFData PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Methods

rnf :: PkgconfigName -> () Source #

Eq PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Ord PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

type Rep PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

type Rep PkgconfigName = D1 ('MetaData "PkgconfigName" "Distribution.Types.PkgconfigName" "Cabal-syntax-3.8.1.0" 'True) (C1 ('MetaCons "PkgconfigName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

mkPkgconfigName :: String -> PkgconfigName Source #

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: Cabal-syntax-2.0.0.2

unPkgconfigName :: PkgconfigName -> String Source #

Convert PkgconfigName to String

Since: Cabal-syntax-2.0.0.2

data PI qpn Source #

Package instance. A package name and an instance.

Constructors

PI qpn I 

Instances

Instances details
Functor PI Source # 
Instance details

Defined in Distribution.Solver.Modular.Package

Methods

fmap :: (a -> b) -> PI a -> PI b Source #

(<$) :: a -> PI b -> PI a Source #

Show qpn => Show (PI qpn) Source # 
Instance details

Defined in Distribution.Solver.Modular.Package

Methods

showsPrec :: Int -> PI qpn -> ShowS Source #

show :: PI qpn -> String Source #

showList :: [PI qpn] -> ShowS Source #

Eq qpn => Eq (PI qpn) Source # 
Instance details

Defined in Distribution.Solver.Modular.Package

Methods

(==) :: PI qpn -> PI qpn -> Bool Source #

(/=) :: PI qpn -> PI qpn -> Bool Source #

Ord qpn => Ord (PI qpn) Source # 
Instance details

Defined in Distribution.Solver.Modular.Package

Methods

compare :: PI qpn -> PI qpn -> Ordering Source #

(<) :: PI qpn -> PI qpn -> Bool Source #

(<=) :: PI qpn -> PI qpn -> Bool Source #

(>) :: PI qpn -> PI qpn -> Bool Source #

(>=) :: PI qpn -> PI qpn -> Bool Source #

max :: PI qpn -> PI qpn -> PI qpn Source #

min :: PI qpn -> PI qpn -> PI qpn Source #

type PN = PackageName Source #

A package name.

type QPV = Qualified PV Source #

Qualified package version.

makeIndependent :: PN -> QPN Source #

Qualify a target package with its own name so that its dependencies are not required to be consistent with other targets.

primaryPP :: PackagePath -> Bool Source #

Is the package in the primary group of packages. This is used to determine (1) if we should try to establish stanza preferences for this goal, and (2) whether or not a user specified --constraint should apply to this dependency (grep primaryPP to see the use sites). In particular this does not include packages pulled in as setup deps.

setupPP :: PackagePath -> Bool Source #

Is the package a dependency of a setup script. This is used to establish whether or not certain constraints should apply to this dependency (grep setupPP to see the use sites).

showI :: I -> String Source #

String representation of an instance.

showPI :: PI QPN -> String Source #

String representation of a package instance.

unPN :: PN -> String Source #

Unpacking a package name.