Cabal-syntax-3.11.0.0: A library for working with .cabal files
Safe HaskellSafe-Inferred
LanguageHaskell2010

Distribution.CabalSpecVersion

Synopsis

Documentation

data CabalSpecVersion Source #

Different Cabal-the-spec versions.

We branch based on this at least in the parser.

Instances

Instances details
Structured CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Binary CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

NFData CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Methods

rnf :: CabalSpecVersion -> () Source #

Data CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Methods

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

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

toConstr :: CabalSpecVersion -> Constr #

dataTypeOf :: CabalSpecVersion -> DataType #

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

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

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

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

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

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

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

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

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

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

Bounded CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Enum CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Generic CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Associated Types

type Rep CabalSpecVersion 
Instance details

Defined in Distribution.CabalSpecVersion

type Rep CabalSpecVersion = D1 ('MetaData "CabalSpecVersion" "Distribution.CabalSpecVersion" "Cabal-syntax-3.11.0.0-97f9" 'False) ((((C1 ('MetaCons "CabalSpecV1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV1_2" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CabalSpecV1_4" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV1_6" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "CabalSpecV1_8" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV1_10" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CabalSpecV1_12" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CabalSpecV1_18" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV1_20" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "CabalSpecV1_22" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV1_24" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CabalSpecV2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CabalSpecV2_2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV2_4" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CabalSpecV3_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV3_4" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CabalSpecV3_6" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CabalSpecV3_8" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV3_12" 'PrefixI 'False) (U1 :: Type -> Type))))))
Read CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Show CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Eq CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Ord CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Newtype CabalSpecVersion SpecVersion Source # 
Instance details

Defined in Distribution.FieldGrammar.Newtypes

type Rep CabalSpecVersion Source # 
Instance details

Defined in Distribution.CabalSpecVersion

type Rep CabalSpecVersion = D1 ('MetaData "CabalSpecVersion" "Distribution.CabalSpecVersion" "Cabal-syntax-3.11.0.0-97f9" 'False) ((((C1 ('MetaCons "CabalSpecV1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV1_2" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CabalSpecV1_4" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV1_6" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "CabalSpecV1_8" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV1_10" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CabalSpecV1_12" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CabalSpecV1_18" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV1_20" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "CabalSpecV1_22" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV1_24" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CabalSpecV2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CabalSpecV2_2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV2_4" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CabalSpecV3_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV3_4" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CabalSpecV3_6" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CabalSpecV3_8" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CabalSpecV3_12" 'PrefixI 'False) (U1 :: Type -> Type))))))

showCabalSpecVersion :: CabalSpecVersion -> String Source #

Show cabal spec version, but not the way in the .cabal files

Since: Cabal-syntax-3.0.0.0

cabalSpecFromVersionDigits :: [Int] -> Maybe CabalSpecVersion Source #

Parse CabalSpecVersion from version digits.

It may fail if for recent versions the version is not exact.

cabalSpecToVersionDigits :: CabalSpecVersion -> [Int] Source #

Since: Cabal-syntax-3.4.0.0

cabalSpecMinimumLibraryVersion :: CabalSpecVersion -> [Int] Source #

What is the minimum Cabal library version which knows how handle this spec version.

Note: this is a point where we could decouple cabal-spec and Cabal versions, if we ever want that.

>>> cabalSpecMinimumLibraryVersion CabalSpecV3_0
[2,5]
>>> cabalSpecMinimumLibraryVersion CabalSpecV2_4
[2,3]

Since: Cabal-syntax-3.4.0.0

data HasElif Source #

Constructors

HasElif 
NoElif 

Instances

Instances details
Show HasElif Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Eq HasElif Source # 
Instance details

Defined in Distribution.CabalSpecVersion

Methods

(==) :: HasElif -> HasElif -> Bool #

(/=) :: HasElif -> HasElif -> Bool #