Distribution.CabalSpecVersion

Cabal-3.2.1.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.CabalSpecVersion

Synopsis

- data CabalSpecVersion
  - = CabalSpecV1_0
  - | CabalSpecV1_2
  - | CabalSpecV1_4
  - | CabalSpecV1_6
  - | CabalSpecV1_8
  - | CabalSpecV1_10
  - | CabalSpecV1_12
  - | CabalSpecV1_18
  - | CabalSpecV1_20
  - | CabalSpecV1_22
  - | CabalSpecV1_24
  - | CabalSpecV2_0
  - | CabalSpecV2_2
  - | CabalSpecV2_4
  - | CabalSpecV3_0
- showCabalSpecVersion :: CabalSpecVersion -> String
- cabalSpecLatest :: CabalSpecVersion
- cabalSpecFromVersionDigits :: [Int] -> CabalSpecVersion
- cabalSpecFromVersionDigitsMaybe :: [Int] -> Maybe CabalSpecVersion
- cabalSpecToVersionDigits :: CabalSpecVersion -> [Int]
- cabalSpecMinimumLibraryVersion :: CabalSpecVersion -> [Int]
- specHasCommonStanzas :: CabalSpecVersion -> HasCommonStanzas
- specHasElif :: CabalSpecVersion -> HasElif
- data HasElif
  - = HasElif
  - | NoElif
- data HasCommonStanzas
  - = HasCommonStanzas
  - | NoCommonStanzas
- data HasGlobstar
  - = HasGlobstar
  - | NoGlobstar

# Documentation

data CabalSpecVersion #

Different Cabal-the-spec versions.

We branch based on this at least in the parser.

Constructors

CabalSpecV1_0 | this is older than `CabalSpecV1_2`
CabalSpecV1_2 | new syntax (sections)
CabalSpecV1_4 |
CabalSpecV1_6 |
CabalSpecV1_8 |
CabalSpecV1_10 |
CabalSpecV1_12 |
CabalSpecV1_18 |
CabalSpecV1_20 |
CabalSpecV1_22 |
CabalSpecV1_24 |
CabalSpecV2_0 |
CabalSpecV2_2 |
CabalSpecV2_4 |
CabalSpecV3_0 |

#### Instances

Instances details

Bounded CabalSpecVersion # |
Instance details Defined in Distribution.CabalSpecVersion Methods minBound :: CabalSpecVersion Source # maxBound :: CabalSpecVersion Source #
Enum CabalSpecVersion # |
Instance details Defined in Distribution.CabalSpecVersion Methods succ :: CabalSpecVersion -> CabalSpecVersion Source # pred :: CabalSpecVersion -> CabalSpecVersion Source # toEnum :: Int -> CabalSpecVersion Source # fromEnum :: CabalSpecVersion -> Int Source # enumFrom :: CabalSpecVersion -> [CabalSpecVersion] Source # enumFromThen :: CabalSpecVersion -> CabalSpecVersion -> [CabalSpecVersion] Source # enumFromTo :: CabalSpecVersion -> CabalSpecVersion -> [CabalSpecVersion] Source # enumFromThenTo :: CabalSpecVersion -> CabalSpecVersion -> CabalSpecVersion -> [CabalSpecVersion] Source #
Eq CabalSpecVersion # |
Instance details Defined in Distribution.CabalSpecVersion Methods (==) :: CabalSpecVersion -> CabalSpecVersion -> Bool # (/=) :: CabalSpecVersion -> CabalSpecVersion -> Bool #
Data CabalSpecVersion # |
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 Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CabalSpecVersion Source # toConstr :: CabalSpecVersion -> Constr Source # dataTypeOf :: CabalSpecVersion -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CabalSpecVersion) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CabalSpecVersion) Source # gmapT :: (forall b. Data b => b -> b) -> CabalSpecVersion -> CabalSpecVersion Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CabalSpecVersion -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CabalSpecVersion -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CabalSpecVersion -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CabalSpecVersion -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CabalSpecVersion -> m CabalSpecVersion Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CabalSpecVersion -> m CabalSpecVersion Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CabalSpecVersion -> m CabalSpecVersion Source #
Ord CabalSpecVersion # |
Instance details Defined in Distribution.CabalSpecVersion Methods compare :: CabalSpecVersion -> CabalSpecVersion -> Ordering # (<) :: CabalSpecVersion -> CabalSpecVersion -> Bool # (<=) :: CabalSpecVersion -> CabalSpecVersion -> Bool # (>) :: CabalSpecVersion -> CabalSpecVersion -> Bool # (>=) :: CabalSpecVersion -> CabalSpecVersion -> Bool # max :: CabalSpecVersion -> CabalSpecVersion -> CabalSpecVersion # min :: CabalSpecVersion -> CabalSpecVersion -> CabalSpecVersion #
Read CabalSpecVersion # |
Instance details Defined in Distribution.CabalSpecVersion Methods readsPrec :: Int -> ReadS CabalSpecVersion Source # readList :: ReadS [CabalSpecVersion] Source # readPrec :: ReadPrec CabalSpecVersion Source # readListPrec :: ReadPrec [CabalSpecVersion] Source #
Show CabalSpecVersion # |
Instance details Defined in Distribution.CabalSpecVersion Methods showsPrec :: Int -> CabalSpecVersion -> ShowS Source # show :: CabalSpecVersion -> String Source # showList :: [CabalSpecVersion] -> ShowS Source #
Generic CabalSpecVersion # |
Instance details Defined in Distribution.CabalSpecVersion Associated Types type Rep CabalSpecVersion :: Type -> Type Source # Methods from :: CabalSpecVersion -> Rep CabalSpecVersion x Source # to :: Rep CabalSpecVersion x -> CabalSpecVersion Source #
type Rep CabalSpecVersion # |
Instance details Defined in Distribution.CabalSpecVersion type Rep CabalSpecVersion = D1 ('MetaData "CabalSpecVersion" "Distribution.CabalSpecVersion" "Cabal-3.2.1.0" '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)))))

showCabalSpecVersion :: CabalSpecVersion -> String #

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

Since: Cabal-3.0.0.0

cabalSpecLatest :: CabalSpecVersion #

cabalSpecFromVersionDigits :: [Int] -> CabalSpecVersion #

cabalSpecFromVersionDigitsMaybe :: [Int] -> Maybe CabalSpecVersion #

cabalSpecToVersionDigits :: CabalSpecVersion -> [Int] #

cabalSpecMinimumLibraryVersion :: CabalSpecVersion -> [Int] #

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]

specHasCommonStanzas :: CabalSpecVersion -> HasCommonStanzas #

specHasElif :: CabalSpecVersion -> HasElif #

data HasElif #

Constructors

HasElif |
NoElif |

#### Instances

Instances details

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

data HasCommonStanzas #

Constructors

HasCommonStanzas |
NoCommonStanzas |

#### Instances

Instances details

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

data HasGlobstar #

Constructors

HasGlobstar |
NoGlobstar |