cabal-file-th-0.2.7: Template Haskell expressions for reading fields from a project's cabal file.
Safe HaskellNone
LanguageHaskell98

Distribution.PackageDescription.TH

Description

Utility functions for reading cabal file fields through template haskell.

Synopsis

Template Haskell functions

packageVariable :: Pretty a => (PackageDescription -> a) -> Q Exp Source #

Renders the package variable specified by the function. The cabal file interrogated is the first one that is found in the current working directory.

packageVariableFrom :: Pretty a => FilePath -> (PackageDescription -> a) -> Q Exp Source #

Renders the package variable specified by the function, from a cabal file and the given path.

packageString :: String -> DocString Source #

Provides a Pretty instance for String, allowing text fields to be used in packageVariable. Use it composed with an accessor, eg. packageVariable (packageString . copyright)

Cabal file data structures

The data structures for the cabal file are re-exported here for ease of use.

data PackageDescription #

Constructors

PackageDescription 

Fields

Instances

Instances details
Package PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

HasBuildInfos PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

Methods

traverseBuildInfos :: Traversal' PackageDescription BuildInfo

Structured PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

Methods

structure :: Proxy PackageDescription -> Structure

structureHash' :: Tagged PackageDescription MD5

Data PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

Methods

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

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

toConstr :: PackageDescription -> Constr

dataTypeOf :: PackageDescription -> DataType

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

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

gmapT :: (forall b. Data b => b -> b) -> PackageDescription -> PackageDescription

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

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

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

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

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

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

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

Generic PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

Associated Types

type Rep PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

type Rep PackageDescription = D1 ('MetaData "PackageDescription" "Distribution.Types.PackageDescription" "Cabal-syntax-3.10.3.0-46ec" 'False) (C1 ('MetaCons "PackageDescription" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "specVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CabalSpecVersion) :*: (S1 ('MetaSel ('Just "package") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageIdentifier) :*: S1 ('MetaSel ('Just "licenseRaw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either License License)))) :*: ((S1 ('MetaSel ('Just "licenseFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SymbolicPath PackageDir LicenseFile]) :*: S1 ('MetaSel ('Just "copyright") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText)) :*: (S1 ('MetaSel ('Just "maintainer") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: S1 ('MetaSel ('Just "author") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText)))) :*: (((S1 ('MetaSel ('Just "stability") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: S1 ('MetaSel ('Just "testedWith") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(CompilerFlavor, VersionRange)])) :*: (S1 ('MetaSel ('Just "homepage") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: S1 ('MetaSel ('Just "pkgUrl") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText))) :*: ((S1 ('MetaSel ('Just "bugReports") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: S1 ('MetaSel ('Just "sourceRepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceRepo])) :*: (S1 ('MetaSel ('Just "synopsis") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText))))) :*: (((S1 ('MetaSel ('Just "category") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: (S1 ('MetaSel ('Just "customFieldsPD") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(String, String)]) :*: S1 ('MetaSel ('Just "buildTypeRaw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe BuildType)))) :*: ((S1 ('MetaSel ('Just "setupBuildInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SetupBuildInfo)) :*: S1 ('MetaSel ('Just "library") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Library))) :*: (S1 ('MetaSel ('Just "subLibraries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Library]) :*: S1 ('MetaSel ('Just "executables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Executable])))) :*: (((S1 ('MetaSel ('Just "foreignLibs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ForeignLib]) :*: S1 ('MetaSel ('Just "testSuites") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TestSuite])) :*: (S1 ('MetaSel ('Just "benchmarks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Benchmark]) :*: S1 ('MetaSel ('Just "dataFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]))) :*: ((S1 ('MetaSel ('Just "dataDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "extraSrcFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath])) :*: (S1 ('MetaSel ('Just "extraTmpFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]) :*: S1 ('MetaSel ('Just "extraDocFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath])))))))
Read PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

Show PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

Methods

showsPrec :: Int -> PackageDescription -> ShowS

show :: PackageDescription -> String

showList :: [PackageDescription] -> ShowS

Binary PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

NFData PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

Methods

rnf :: PackageDescription -> ()

Eq PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

Ord PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

type Rep PackageDescription 
Instance details

Defined in Distribution.Types.PackageDescription

type Rep PackageDescription = D1 ('MetaData "PackageDescription" "Distribution.Types.PackageDescription" "Cabal-syntax-3.10.3.0-46ec" 'False) (C1 ('MetaCons "PackageDescription" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "specVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CabalSpecVersion) :*: (S1 ('MetaSel ('Just "package") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageIdentifier) :*: S1 ('MetaSel ('Just "licenseRaw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either License License)))) :*: ((S1 ('MetaSel ('Just "licenseFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SymbolicPath PackageDir LicenseFile]) :*: S1 ('MetaSel ('Just "copyright") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText)) :*: (S1 ('MetaSel ('Just "maintainer") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: S1 ('MetaSel ('Just "author") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText)))) :*: (((S1 ('MetaSel ('Just "stability") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: S1 ('MetaSel ('Just "testedWith") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(CompilerFlavor, VersionRange)])) :*: (S1 ('MetaSel ('Just "homepage") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: S1 ('MetaSel ('Just "pkgUrl") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText))) :*: ((S1 ('MetaSel ('Just "bugReports") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: S1 ('MetaSel ('Just "sourceRepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceRepo])) :*: (S1 ('MetaSel ('Just "synopsis") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText))))) :*: (((S1 ('MetaSel ('Just "category") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ShortText) :*: (S1 ('MetaSel ('Just "customFieldsPD") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(String, String)]) :*: S1 ('MetaSel ('Just "buildTypeRaw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe BuildType)))) :*: ((S1 ('MetaSel ('Just "setupBuildInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SetupBuildInfo)) :*: S1 ('MetaSel ('Just "library") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Library))) :*: (S1 ('MetaSel ('Just "subLibraries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Library]) :*: S1 ('MetaSel ('Just "executables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Executable])))) :*: (((S1 ('MetaSel ('Just "foreignLibs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ForeignLib]) :*: S1 ('MetaSel ('Just "testSuites") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TestSuite])) :*: (S1 ('MetaSel ('Just "benchmarks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Benchmark]) :*: S1 ('MetaSel ('Just "dataFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]))) :*: ((S1 ('MetaSel ('Just "dataDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "extraSrcFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath])) :*: (S1 ('MetaSel ('Just "extraTmpFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]) :*: S1 ('MetaSel ('Just "extraDocFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath])))))))

data PackageIdentifier #

Constructors

PackageIdentifier 

Fields

Instances

Instances details
Package PackageIdentifier 
Instance details

Defined in Distribution.Package

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 
Instance details

Defined in Distribution.Types.PackageId

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

Defined in Distribution.Types.PackageId

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

NFData PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Methods

rnf :: PackageIdentifier -> ()

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.10.3.0-46ec" '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 Version #

Instances

Instances details
Parsec Version 
Instance details

Defined in Distribution.Types.Version

Methods

parsec :: CabalParsing m => m Version

Pretty Version 
Instance details

Defined in Distribution.Types.Version

Methods

pretty :: Version -> Doc

prettyVersioned :: CabalSpecVersion -> Version -> Doc

Structured Version 
Instance details

Defined in Distribution.Types.Version

Methods

structure :: Proxy Version -> Structure

structureHash' :: Tagged Version MD5

Data Version 
Instance details

Defined in Distribution.Types.Version

Methods

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

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

toConstr :: Version -> Constr

dataTypeOf :: Version -> DataType

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

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

gmapT :: (forall b. Data b => b -> b) -> Version -> Version

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

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

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

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

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

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

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

Generic Version 
Instance details

Defined in Distribution.Types.Version

Associated Types

type Rep Version 
Instance details

Defined in Distribution.Types.Version

type Rep Version = D1 ('MetaData "Version" "Distribution.Types.Version" "Cabal-syntax-3.10.3.0-46ec" 'False) (C1 ('MetaCons "PV0" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64)) :+: C1 ('MetaCons "PV1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int])))

Methods

from :: Version -> Rep Version x

to :: Rep Version x -> Version

Read Version 
Instance details

Defined in Distribution.Types.Version

Methods

readsPrec :: Int -> ReadS Version

readList :: ReadS [Version]

readPrec :: ReadPrec Version

readListPrec :: ReadPrec [Version]

Show Version 
Instance details

Defined in Distribution.Types.Version

Methods

showsPrec :: Int -> Version -> ShowS

show :: Version -> String

showList :: [Version] -> ShowS

Binary Version 
Instance details

Defined in Distribution.Types.Version

Methods

put :: Version -> Put

get :: Get Version

putList :: [Version] -> Put

NFData Version 
Instance details

Defined in Distribution.Types.Version

Methods

rnf :: Version -> ()

Eq Version 
Instance details

Defined in Distribution.Types.Version

Methods

(==) :: Version -> Version -> Bool

(/=) :: Version -> Version -> Bool

Ord Version 
Instance details

Defined in Distribution.Types.Version

Methods

compare :: Version -> Version -> Ordering

(<) :: Version -> Version -> Bool

(<=) :: Version -> Version -> Bool

(>) :: Version -> Version -> Bool

(>=) :: Version -> Version -> Bool

max :: Version -> Version -> Version

min :: Version -> Version -> Version

type Rep Version 
Instance details

Defined in Distribution.Types.Version

type Rep Version = D1 ('MetaData "Version" "Distribution.Types.Version" "Cabal-syntax-3.10.3.0-46ec" 'False) (C1 ('MetaCons "PV0" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64)) :+: C1 ('MetaCons "PV1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int])))

alterVersion :: ([Int] -> [Int]) -> Version -> Version #

mkVersion :: [Int] -> Version #

mkVersion' :: Version -> Version #

data Bound #

Instances

Instances details
Show Bound 
Instance details

Defined in Distribution.Types.VersionInterval

Methods

showsPrec :: Int -> Bound -> ShowS

show :: Bound -> String

showList :: [Bound] -> ShowS

Eq Bound 
Instance details

Defined in Distribution.Types.VersionInterval

Methods

(==) :: Bound -> Bound -> Bool

(/=) :: Bound -> Bound -> Bool

data LowerBound #

Constructors

LowerBound !Version !Bound 

Instances

Instances details
Show LowerBound 
Instance details

Defined in Distribution.Types.VersionInterval

Methods

showsPrec :: Int -> LowerBound -> ShowS

show :: LowerBound -> String

showList :: [LowerBound] -> ShowS

Eq LowerBound 
Instance details

Defined in Distribution.Types.VersionInterval

Methods

(==) :: LowerBound -> LowerBound -> Bool

(/=) :: LowerBound -> LowerBound -> Bool

data UpperBound #

Instances

Instances details
Show UpperBound 
Instance details

Defined in Distribution.Types.VersionInterval

Methods

showsPrec :: Int -> UpperBound -> ShowS

show :: UpperBound -> String

showList :: [UpperBound] -> ShowS

Eq UpperBound 
Instance details

Defined in Distribution.Types.VersionInterval

Methods

(==) :: UpperBound -> UpperBound -> Bool

(/=) :: UpperBound -> UpperBound -> Bool

data VersionInterval #

Instances

Instances details
Show VersionInterval 
Instance details

Defined in Distribution.Types.VersionInterval

Methods

showsPrec :: Int -> VersionInterval -> ShowS

show :: VersionInterval -> String

showList :: [VersionInterval] -> ShowS

Eq VersionInterval 
Instance details

Defined in Distribution.Types.VersionInterval

data VersionIntervals #

Instances

Instances details
Show VersionIntervals 
Instance details

Defined in Distribution.Types.VersionInterval

Methods

showsPrec :: Int -> VersionIntervals -> ShowS

show :: VersionIntervals -> String

showList :: [VersionIntervals] -> ShowS

Eq VersionIntervals 
Instance details

Defined in Distribution.Types.VersionInterval

foldVersionRange :: a -> (Version -> a) -> (Version -> a) -> (Version -> a) -> (a -> a -> a) -> (a -> a -> a) -> VersionRange -> a #

data VersionRangeF a #

Instances

Instances details
Foldable VersionRangeF 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

fold :: Monoid m => VersionRangeF m -> m

foldMap :: Monoid m => (a -> m) -> VersionRangeF a -> m

foldMap' :: Monoid m => (a -> m) -> VersionRangeF a -> m

foldr :: (a -> b -> b) -> b -> VersionRangeF a -> b

foldr' :: (a -> b -> b) -> b -> VersionRangeF a -> b

foldl :: (b -> a -> b) -> b -> VersionRangeF a -> b

foldl' :: (b -> a -> b) -> b -> VersionRangeF a -> b

foldr1 :: (a -> a -> a) -> VersionRangeF a -> a

foldl1 :: (a -> a -> a) -> VersionRangeF a -> a

toList :: VersionRangeF a -> [a]

null :: VersionRangeF a -> Bool

length :: VersionRangeF a -> Int

elem :: Eq a => a -> VersionRangeF a -> Bool

maximum :: Ord a => VersionRangeF a -> a

minimum :: Ord a => VersionRangeF a -> a

sum :: Num a => VersionRangeF a -> a

product :: Num a => VersionRangeF a -> a

Traversable VersionRangeF 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

traverse :: Applicative f => (a -> f b) -> VersionRangeF a -> f (VersionRangeF b)

sequenceA :: Applicative f => VersionRangeF (f a) -> f (VersionRangeF a)

mapM :: Monad m => (a -> m b) -> VersionRangeF a -> m (VersionRangeF b)

sequence :: Monad m => VersionRangeF (m a) -> m (VersionRangeF a)

Functor VersionRangeF 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

fmap :: (a -> b) -> VersionRangeF a -> VersionRangeF b

(<$) :: a -> VersionRangeF b -> VersionRangeF a

Data a => Data (VersionRangeF a) 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VersionRangeF a -> c (VersionRangeF a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (VersionRangeF a)

toConstr :: VersionRangeF a -> Constr

dataTypeOf :: VersionRangeF a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (VersionRangeF a))

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

gmapT :: (forall b. Data b => b -> b) -> VersionRangeF a -> VersionRangeF a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VersionRangeF a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VersionRangeF a -> r

gmapQ :: (forall d. Data d => d -> u) -> VersionRangeF a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> VersionRangeF a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> VersionRangeF a -> m (VersionRangeF a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VersionRangeF a -> m (VersionRangeF a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VersionRangeF a -> m (VersionRangeF a)

Generic (VersionRangeF a) 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Associated Types

type Rep (VersionRangeF a) 
Instance details

Defined in Distribution.Types.VersionRange.Internal

type Rep (VersionRangeF a) = D1 ('MetaData "VersionRangeF" "Distribution.Types.VersionRange.Internal" "Cabal-syntax-3.10.3.0-46ec" 'False) (((C1 ('MetaCons "ThisVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "LaterVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version))) :+: (C1 ('MetaCons "OrLaterVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "EarlierVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)))) :+: ((C1 ('MetaCons "OrEarlierVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "MajorBoundVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version))) :+: (C1 ('MetaCons "UnionVersionRangesF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "IntersectVersionRangesF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))

Methods

from :: VersionRangeF a -> Rep (VersionRangeF a) x

to :: Rep (VersionRangeF a) x -> VersionRangeF a

Read a => Read (VersionRangeF a) 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

readsPrec :: Int -> ReadS (VersionRangeF a)

readList :: ReadS [VersionRangeF a]

readPrec :: ReadPrec (VersionRangeF a)

readListPrec :: ReadPrec [VersionRangeF a]

Show a => Show (VersionRangeF a) 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

showsPrec :: Int -> VersionRangeF a -> ShowS

show :: VersionRangeF a -> String

showList :: [VersionRangeF a] -> ShowS

Eq a => Eq (VersionRangeF a) 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

(==) :: VersionRangeF a -> VersionRangeF a -> Bool

(/=) :: VersionRangeF a -> VersionRangeF a -> Bool

type Rep (VersionRangeF a) 
Instance details

Defined in Distribution.Types.VersionRange.Internal

type Rep (VersionRangeF a) = D1 ('MetaData "VersionRangeF" "Distribution.Types.VersionRange.Internal" "Cabal-syntax-3.10.3.0-46ec" 'False) (((C1 ('MetaCons "ThisVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "LaterVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version))) :+: (C1 ('MetaCons "OrLaterVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "EarlierVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)))) :+: ((C1 ('MetaCons "OrEarlierVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "MajorBoundVersionF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version))) :+: (C1 ('MetaCons "UnionVersionRangesF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "IntersectVersionRangesF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))

data VersionRange #

Instances

Instances details
Parsec VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

parsec :: CabalParsing m => m VersionRange

Pretty VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

pretty :: VersionRange -> Doc

prettyVersioned :: CabalSpecVersion -> VersionRange -> Doc

Structured VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

structure :: Proxy VersionRange -> Structure

structureHash' :: Tagged VersionRange MD5

Data VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

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

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

toConstr :: VersionRange -> Constr

dataTypeOf :: VersionRange -> DataType

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

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

gmapT :: (forall b. Data b => b -> b) -> VersionRange -> VersionRange

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

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

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

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

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

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

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

Generic VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Associated Types

type Rep VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

type Rep VersionRange = D1 ('MetaData "VersionRange" "Distribution.Types.VersionRange.Internal" "Cabal-syntax-3.10.3.0-46ec" 'False) (((C1 ('MetaCons "ThisVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "LaterVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version))) :+: (C1 ('MetaCons "OrLaterVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "EarlierVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)))) :+: ((C1 ('MetaCons "OrEarlierVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "MajorBoundVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version))) :+: (C1 ('MetaCons "UnionVersionRanges" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VersionRange) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VersionRange)) :+: C1 ('MetaCons "IntersectVersionRanges" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VersionRange) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VersionRange)))))
Read VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

readsPrec :: Int -> ReadS VersionRange

readList :: ReadS [VersionRange]

readPrec :: ReadPrec VersionRange

readListPrec :: ReadPrec [VersionRange]

Show VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

showsPrec :: Int -> VersionRange -> ShowS

show :: VersionRange -> String

showList :: [VersionRange] -> ShowS

Binary VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

put :: VersionRange -> Put

get :: Get VersionRange

putList :: [VersionRange] -> Put

NFData VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

rnf :: VersionRange -> ()

Eq VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Methods

(==) :: VersionRange -> VersionRange -> Bool

(/=) :: VersionRange -> VersionRange -> Bool

Ord VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

Newtype (CompilerFlavor, VersionRange) TestedWith 
Instance details

Defined in Distribution.FieldGrammar.Newtypes

Methods

pack :: (CompilerFlavor, VersionRange) -> TestedWith

unpack :: TestedWith -> (CompilerFlavor, VersionRange)

type Rep VersionRange 
Instance details

Defined in Distribution.Types.VersionRange.Internal

type Rep VersionRange = D1 ('MetaData "VersionRange" "Distribution.Types.VersionRange.Internal" "Cabal-syntax-3.10.3.0-46ec" 'False) (((C1 ('MetaCons "ThisVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "LaterVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version))) :+: (C1 ('MetaCons "OrLaterVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "EarlierVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)))) :+: ((C1 ('MetaCons "OrEarlierVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :+: C1 ('MetaCons "MajorBoundVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version))) :+: (C1 ('MetaCons "UnionVersionRanges" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VersionRange) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VersionRange)) :+: C1 ('MetaCons "IntersectVersionRanges" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VersionRange) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VersionRange)))))