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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Distribution.Solver.Modular.Package

Synopsis

- data I = I Ver Loc
- data Loc
  - = Inst PId
  - | InRepo
- type PackageId = PackageIdentifier
- data PackageIdentifier = PackageIdentifier {
  - pkgName :: PackageName
  - pkgVersion :: Version
  }
- data PackageName
- mkPackageName :: String -> PackageName
- unPackageName :: PackageName -> String
- data PkgconfigName
- mkPkgconfigName :: String -> PkgconfigName
- unPkgconfigName :: PkgconfigName -> String
- data PI qpn = PI qpn I
- type PN = PackageName
- type QPV = Qualified PV
- instI :: I -> Bool
- makeIndependent :: PN -> QPN
- primaryPP :: PackagePath -> Bool
- setupPP :: PackagePath -> Bool
- showI :: I -> String
- showPI :: PI QPN -> String
- unPN :: PN -> String

# Documentation

data I #

Instance. A version number and a location.

Constructors

I Ver Loc |

#### Instances

Instances details

Show I # |
Instance details Defined in Distribution.Solver.Modular.Package Methods showsPrec :: Int -> I -> ShowS # show :: I -> String # showList :: [I] -> ShowS #
Eq I # |
Instance details Defined in Distribution.Solver.Modular.Package Methods (==) :: I -> I -> Bool # (/=) :: I -> I -> Bool #
Ord I # |
Instance details Defined in Distribution.Solver.Modular.Package Methods compare :: I -> I -> Ordering # (<) :: I -> I -> Bool # (<=) :: I -> I -> Bool # (>) :: I -> I -> Bool # (>=) :: I -> I -> Bool # max :: I -> I -> I # min :: I -> I -> I #

data Loc #

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 # |
Instance details Defined in Distribution.Solver.Modular.Package Methods showsPrec :: Int -> Loc -> ShowS # show :: Loc -> String # showList :: [Loc] -> ShowS #
Eq Loc # |
Instance details Defined in Distribution.Solver.Modular.Package Methods (==) :: Loc -> Loc -> Bool # (/=) :: Loc -> Loc -> Bool #
Ord Loc # |
Instance details Defined in Distribution.Solver.Modular.Package Methods compare :: Loc -> Loc -> Ordering # (<) :: Loc -> Loc -> Bool # (<=) :: Loc -> Loc -> Bool # (>) :: Loc -> Loc -> Bool # (>=) :: Loc -> Loc -> Bool # max :: Loc -> Loc -> Loc # min :: Loc -> Loc -> Loc #

type PackageId = PackageIdentifier #

data PackageIdentifier #

Constructors

PackageIdentifier |
Fields pkgName :: PackageName pkgVersion :: Version

#### Instances

Instances details

Package PackageIdentifier |
Instance details Defined in Distribution.Package Methods packageId :: PackageIdentifier -> PackageIdentifier
Parsec PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods parsec :: CabalParsing m => m PackageIdentifier
Pretty PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods pretty :: PackageIdentifier -> Doc prettyVersioned :: CabalSpecVersion -> PackageIdentifier -> Doc
Structured PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods structure :: Proxy PackageIdentifier -> Structure structureHash' :: Tagged PackageIdentifier MD5
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PackageIdentifier toConstr :: PackageIdentifier -> Constr dataTypeOf :: PackageIdentifier -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PackageIdentifier) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PackageIdentifier) gmapT :: (forall b. Data b => b -> b) -> PackageIdentifier -> PackageIdentifier gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PackageIdentifier -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PackageIdentifier -> r gmapQ :: (forall d. Data d => d -> u) -> PackageIdentifier -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> PackageIdentifier -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier
Generic PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Associated Types type Rep PackageIdentifier :: Type -> Type Methods from :: PackageIdentifier -> Rep PackageIdentifier x to :: Rep PackageIdentifier x -> PackageIdentifier
Read PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods readsPrec :: Int -> ReadS PackageIdentifier # readList :: ReadS [PackageIdentifier] # readPrec :: ReadPrec PackageIdentifier readListPrec :: ReadPrec [PackageIdentifier]
Show PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods showsPrec :: Int -> PackageIdentifier -> ShowS # show :: PackageIdentifier -> String # showList :: [PackageIdentifier] -> ShowS #
Binary PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods put :: PackageIdentifier -> Put # get :: Get PackageIdentifier # putList :: [PackageIdentifier] -> Put #
NFData PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods rnf :: PackageIdentifier -> () #
Eq PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods (==) :: PackageIdentifier -> PackageIdentifier -> Bool # (/=) :: PackageIdentifier -> PackageIdentifier -> Bool #
Ord PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods compare :: PackageIdentifier -> PackageIdentifier -> Ordering # (<) :: PackageIdentifier -> PackageIdentifier -> Bool # (<=) :: PackageIdentifier -> PackageIdentifier -> Bool # (>) :: PackageIdentifier -> PackageIdentifier -> Bool # (>=) :: PackageIdentifier -> PackageIdentifier -> Bool # max :: PackageIdentifier -> PackageIdentifier -> PackageIdentifier # min :: PackageIdentifier -> PackageIdentifier -> PackageIdentifier #
type Rep PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId type Rep PackageIdentifier = D1 ('MetaData "PackageIdentifier" "Distribution.Types.PackageId" "Cabal-syntax-3.10.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 #

#### Instances

Instances details

Parsec PackageName |
Instance details Defined in Distribution.Types.PackageName Methods parsec :: CabalParsing m => m PackageName
Pretty PackageName |
Instance details Defined in Distribution.Types.PackageName Methods pretty :: PackageName -> Doc prettyVersioned :: CabalSpecVersion -> PackageName -> Doc
Structured PackageName |
Instance details Defined in Distribution.Types.PackageName Methods structure :: Proxy PackageName -> Structure structureHash' :: Tagged PackageName MD5
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PackageName toConstr :: PackageName -> Constr dataTypeOf :: PackageName -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PackageName) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PackageName) gmapT :: (forall b. Data b => b -> b) -> PackageName -> PackageName gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PackageName -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PackageName -> r gmapQ :: (forall d. Data d => d -> u) -> PackageName -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> PackageName -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName
IsString PackageName |
Instance details Defined in Distribution.Types.PackageName Methods fromString :: String -> PackageName #
Generic PackageName |
Instance details Defined in Distribution.Types.PackageName Associated Types type Rep PackageName :: Type -> Type Methods from :: PackageName -> Rep PackageName x to :: Rep PackageName x -> PackageName
Read PackageName |
Instance details Defined in Distribution.Types.PackageName Methods readsPrec :: Int -> ReadS PackageName # readList :: ReadS [PackageName] # readPrec :: ReadPrec PackageName readListPrec :: ReadPrec [PackageName]
Show PackageName |
Instance details Defined in Distribution.Types.PackageName Methods showsPrec :: Int -> PackageName -> ShowS # show :: PackageName -> String # showList :: [PackageName] -> ShowS #
Binary PackageName |
Instance details Defined in Distribution.Types.PackageName Methods put :: PackageName -> Put # get :: Get PackageName # putList :: [PackageName] -> Put #
NFData PackageName |
Instance details Defined in Distribution.Types.PackageName Methods rnf :: PackageName -> () #
Eq PackageName |
Instance details Defined in Distribution.Types.PackageName Methods (==) :: PackageName -> PackageName -> Bool # (/=) :: PackageName -> PackageName -> Bool #
Ord PackageName |
Instance details Defined in Distribution.Types.PackageName Methods compare :: PackageName -> PackageName -> Ordering # (<) :: PackageName -> PackageName -> Bool # (<=) :: PackageName -> PackageName -> Bool # (>) :: PackageName -> PackageName -> Bool # (>=) :: PackageName -> PackageName -> Bool # max :: PackageName -> PackageName -> PackageName # min :: PackageName -> PackageName -> PackageName #
type Rep PackageName |
Instance details Defined in Distribution.Types.PackageName type Rep PackageName = D1 ('MetaData "PackageName" "Distribution.Types.PackageName" "Cabal-syntax-3.10.1.0" 'True) (C1 ('MetaCons "PackageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

mkPackageName :: String -> PackageName #

unPackageName :: PackageName -> String #

data PkgconfigName #

#### Instances

Instances details

Parsec PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName Methods parsec :: CabalParsing m => m PkgconfigName
Pretty PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName Methods pretty :: PkgconfigName -> Doc prettyVersioned :: CabalSpecVersion -> PkgconfigName -> Doc
Structured PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName Methods structure :: Proxy PkgconfigName -> Structure structureHash' :: Tagged PkgconfigName MD5
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PkgconfigName toConstr :: PkgconfigName -> Constr dataTypeOf :: PkgconfigName -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PkgconfigName) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PkgconfigName) gmapT :: (forall b. Data b => b -> b) -> PkgconfigName -> PkgconfigName gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PkgconfigName -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PkgconfigName -> r gmapQ :: (forall d. Data d => d -> u) -> PkgconfigName -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> PkgconfigName -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> PkgconfigName -> m PkgconfigName gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PkgconfigName -> m PkgconfigName gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PkgconfigName -> m PkgconfigName
IsString PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName Methods fromString :: String -> PkgconfigName #
Generic PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName Associated Types type Rep PkgconfigName :: Type -> Type Methods from :: PkgconfigName -> Rep PkgconfigName x to :: Rep PkgconfigName x -> PkgconfigName
Read PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName Methods readsPrec :: Int -> ReadS PkgconfigName # readList :: ReadS [PkgconfigName] # readPrec :: ReadPrec PkgconfigName readListPrec :: ReadPrec [PkgconfigName]
Show PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName Methods showsPrec :: Int -> PkgconfigName -> ShowS # show :: PkgconfigName -> String # showList :: [PkgconfigName] -> ShowS #
Binary PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName Methods put :: PkgconfigName -> Put # get :: Get PkgconfigName # putList :: [PkgconfigName] -> Put #
NFData PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName Methods rnf :: PkgconfigName -> () #
Eq PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName Methods (==) :: PkgconfigName -> PkgconfigName -> Bool # (/=) :: PkgconfigName -> PkgconfigName -> Bool #
Ord PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName Methods compare :: PkgconfigName -> PkgconfigName -> Ordering # (<) :: PkgconfigName -> PkgconfigName -> Bool # (<=) :: PkgconfigName -> PkgconfigName -> Bool # (>) :: PkgconfigName -> PkgconfigName -> Bool # (>=) :: PkgconfigName -> PkgconfigName -> Bool # max :: PkgconfigName -> PkgconfigName -> PkgconfigName # min :: PkgconfigName -> PkgconfigName -> PkgconfigName #
type Rep PkgconfigName |
Instance details Defined in Distribution.Types.PkgconfigName type Rep PkgconfigName = D1 ('MetaData "PkgconfigName" "Distribution.Types.PkgconfigName" "Cabal-syntax-3.10.1.0" 'True) (C1 ('MetaCons "PkgconfigName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

mkPkgconfigName :: String -> PkgconfigName #

unPkgconfigName :: PkgconfigName -> String #

data PI qpn #

Package instance. A package name and an instance.

Constructors

PI qpn I |

#### Instances

Instances details

Functor PI # |
Instance details Defined in Distribution.Solver.Modular.Package Methods fmap :: (a -> b) -> PI a -> PI b # (<$) :: a -> PI b -> PI a #
Show qpn => Show (PI qpn) # |
Instance details Defined in Distribution.Solver.Modular.Package Methods showsPrec :: Int -> PI qpn -> ShowS # show :: PI qpn -> String # showList :: [PI qpn] -> ShowS #
Eq qpn => Eq (PI qpn) # |
Instance details Defined in Distribution.Solver.Modular.Package Methods (==) :: PI qpn -> PI qpn -> Bool # (/=) :: PI qpn -> PI qpn -> Bool #
Ord qpn => Ord (PI qpn) # |
Instance details Defined in Distribution.Solver.Modular.Package Methods compare :: PI qpn -> PI qpn -> Ordering # (<) :: PI qpn -> PI qpn -> Bool # (<=) :: PI qpn -> PI qpn -> Bool # (>) :: PI qpn -> PI qpn -> Bool # (>=) :: PI qpn -> PI qpn -> Bool # max :: PI qpn -> PI qpn -> PI qpn # min :: PI qpn -> PI qpn -> PI qpn #

type PN = PackageName #

A package name.

type QPV = Qualified PV #

Qualified package version.

instI :: I -> Bool #

makeIndependent :: PN -> QPN #

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

primaryPP :: PackagePath -> Bool #

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 #

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 #

String representation of an instance.

showPI :: PI QPN -> String #

String representation of a package instance.

unPN :: PN -> String #

Unpacking a package name.