accelerate-llvm-native-1.2.0.0: Accelerate backend for multicore CPUs

Copyright[2017] Trevor L. McDonell
LicenseBSD3
MaintainerTrevor L. McDonell <tmcdonell@cse.unsw.edu.au>
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Data.Array.Accelerate.LLVM.Native.Distribution.Simple

Description

 
Synopsis

Documentation

defaultMain :: IO () Source #

A simple implementation of main for a Cabal setup script. This is the same as defaultMain, with added support for building libraries utilising runQ*.

simpleUserHooks :: UserHooks Source #

Hooks that correspond to a plain instantiation of the "simple" build system.

defaultUserHooks :: UserHooks #

Basic autoconf UserHooks:

Thus configure can use local system information to generate package.buildinfo and possibly other files.

defaultMainWithHooksNoReadArgs :: UserHooks -> GenericPackageDescription -> [String] -> IO () #

A customizable version of defaultMainNoRead that also takes the command line arguments.

Since: 2.2.0.0

defaultMainNoRead :: GenericPackageDescription -> IO () #

Like defaultMain, but accepts the package description as input rather than using IO to read it.

defaultMainWithHooksArgs :: UserHooks -> [String] -> IO () #

A customizable version of defaultMain that also takes the command line arguments.

defaultMainWithHooks :: UserHooks -> IO () #

A customizable version of defaultMain.

defaultMainArgs :: [String] -> IO () #

A version of defaultMain that is passed the command line arguments, rather than getting them from the environment.

emptyUserHooks :: UserHooks #

Empty UserHooks which do nothing.

type Args = [String] #

data UserHooks #

Hooks allow authors to add specific functionality before and after a command is run, and also to specify additional preprocessors.

  • WARNING: The hooks interface is under rather constant flux as we try to understand users needs. Setup files that depend on this interface may break in future releases.

Constructors

UserHooks 

Fields

profilingSupported :: Compiler -> Bool #

Does this compiler support profiling?

coverageSupported :: Compiler -> Bool #

Does this compiler support Haskell program coverage?

arResponseFilesSupported :: Compiler -> Bool #

Does this compiler's "ar" command supports response file arguments (i.e. @file-style arguments).

libraryDynDirSupported :: Compiler -> Bool #

Does this compiler support a package database entry with: "dynamic-library-dirs"?

backpackSupported :: Compiler -> Bool #

Does this compiler support Backpack?

unitIdSupported :: Compiler -> Bool #

Does this compiler support unit IDs?

packageKeySupported :: Compiler -> Bool #

Does this compiler support package keys?

unifiedIPIDRequired :: Compiler -> Bool #

Does this compiler have unified IPIDs (so no package keys)

renamingPackageFlagsSupported :: Compiler -> Bool #

Does this compiler support thinning/renaming on package flags?

reexportedModulesSupported :: Compiler -> Bool #

Does this compiler support reexported-modules?

parmakeSupported :: Compiler -> Bool #

Does this compiler support parallel --make mode?

extensionsToFlags :: Compiler -> [Extension] -> [Flag] #

For the given compiler, return the flags for the supported extensions.

unsupportedExtensions :: Compiler -> [Extension] -> [Extension] #

For the given compiler, return the extensions it does not support.

registrationPackageDB :: PackageDBStack -> PackageDB #

Return the package that we should register into. This is the package db at the top of the stack.

compilerCompatVersion :: CompilerFlavor -> Compiler -> Maybe Version #

Is this compiler compatible with the compiler flavour we're interested in, and if so what version does it claim to be compatible with.

For example this checks if the compiler is actually GHC-7.x or is another compiler that claims to be compatible with some GHC-7.x version.

case compilerCompatVersion GHC compiler of
  Just (Version (7:_)) -> ...
  _                    -> ...

compilerCompatFlavor :: CompilerFlavor -> Compiler -> Bool #

Is this compiler compatible with the compiler flavour we're interested in?

For example this checks if the compiler is actually GHC or is another compiler that claims to be compatible with some version of GHC, e.g. GHCJS.

if compilerCompatFlavor GHC compiler then ... else ...

data Compiler #

Constructors

Compiler 

Fields

Instances
Eq Compiler 
Instance details
Read Compiler 
Instance details
Show Compiler 
Instance details
Generic Compiler 
Instance details

Associated Types

type Rep Compiler :: * -> * #

Methods

from :: Compiler -> Rep Compiler x #

to :: Rep Compiler x -> Compiler #

Binary Compiler 
Instance details

Methods

put :: Compiler -> Put #

get :: Get Compiler #

putList :: [Compiler] -> Put #

type Rep Compiler 
Instance details

data PackageDB #

Some compilers have a notion of a database of available packages. For some there is just one global db of packages, other compilers support a per-user or an arbitrary db specified at some location in the file system. This can be used to build isloated environments of packages, for example to build a collection of related packages without installing them globally.

Instances
Eq PackageDB 
Instance details
Ord PackageDB 
Instance details
Read PackageDB 
Instance details
Show PackageDB 
Instance details
Generic PackageDB 
Instance details

Associated Types

type Rep PackageDB :: * -> * #

Binary PackageDB 
Instance details
type Rep PackageDB 
Instance details
type Rep PackageDB = D1 (MetaData "PackageDB" "Distribution.Simple.Compiler" "Cabal-2.2.0.0" False) (C1 (MetaCons "GlobalPackageDB" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "UserPackageDB" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "SpecificPackageDB" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath))))

type PackageDBStack = [PackageDB] #

We typically get packages from several databases, and stack them together. This type lets us be explicit about that stacking. For example typical stacks include:

[GlobalPackageDB]
[GlobalPackageDB, UserPackageDB]
[GlobalPackageDB, SpecificPackageDB "package.conf.inplace"]

Note that the GlobalPackageDB is invariably at the bottom since it contains the rts, base and other special compiler-specific packages.

We are not restricted to using just the above combinations. In particular we can use several custom package dbs and the user package db together.

When it comes to writing, the top most (last) package is used.

data OptimisationLevel #

Some compilers support optimising. Some have different levels. For compilers that do not the level is just capped to the level they do support.

Instances
Bounded OptimisationLevel 
Instance details
Enum OptimisationLevel 
Instance details
Eq OptimisationLevel 
Instance details
Read OptimisationLevel 
Instance details
Show OptimisationLevel 
Instance details
Generic OptimisationLevel 
Instance details

Associated Types

type Rep OptimisationLevel :: * -> * #

Binary OptimisationLevel 
Instance details
type Rep OptimisationLevel 
Instance details
type Rep OptimisationLevel = D1 (MetaData "OptimisationLevel" "Distribution.Simple.Compiler" "Cabal-2.2.0.0" False) (C1 (MetaCons "NoOptimisation" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "NormalOptimisation" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MaximumOptimisation" PrefixI False) (U1 :: * -> *)))

data DebugInfoLevel #

Some compilers support emitting debug info. Some have different levels. For compilers that do not the level is just capped to the level they do support.

Instances
Bounded DebugInfoLevel 
Instance details
Enum DebugInfoLevel 
Instance details
Eq DebugInfoLevel 
Instance details
Read DebugInfoLevel 
Instance details
Show DebugInfoLevel 
Instance details
Generic DebugInfoLevel 
Instance details

Associated Types

type Rep DebugInfoLevel :: * -> * #

Binary DebugInfoLevel 
Instance details
type Rep DebugInfoLevel 
Instance details
type Rep DebugInfoLevel = D1 (MetaData "DebugInfoLevel" "Distribution.Simple.Compiler" "Cabal-2.2.0.0" False) ((C1 (MetaCons "NoDebugInfo" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MinimalDebugInfo" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "NormalDebugInfo" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MaximalDebugInfo" PrefixI False) (U1 :: * -> *)))

data ProfDetailLevel #

Some compilers (notably GHC) support profiling and can instrument programs so the system can account costs to different functions. There are different levels of detail that can be used for this accounting. For compilers that do not support this notion or the particular detail levels, this is either ignored or just capped to some similar level they do support.

Instances
Eq ProfDetailLevel 
Instance details
Read ProfDetailLevel 
Instance details
Show ProfDetailLevel 
Instance details
Generic ProfDetailLevel 
Instance details

Associated Types

type Rep ProfDetailLevel :: * -> * #

Binary ProfDetailLevel 
Instance details
type Rep ProfDetailLevel 
Instance details
type Rep ProfDetailLevel = D1 (MetaData "ProfDetailLevel" "Distribution.Simple.Compiler" "Cabal-2.2.0.0" False) ((C1 (MetaCons "ProfDetailNone" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "ProfDetailDefault" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ProfDetailExportedFunctions" PrefixI False) (U1 :: * -> *))) :+: (C1 (MetaCons "ProfDetailToplevelFunctions" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "ProfDetailAllFunctions" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ProfDetailOther" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))))

defaultHookedPackageDesc :: IO (Maybe FilePath) #

Optional auxiliary package information file (pkgname.buildinfo)

installedPackageId :: HasUnitId pkg => pkg -> UnitId #

Compatibility wrapper for Cabal pre-1.24.

packageVersion :: Package pkg => pkg -> Version #

packageName :: Package pkg => pkg -> PackageName #

class Package pkg where #

Class of things that have a PackageIdentifier

Types in this class are all notions of a package. This allows us to have different types for the different phases that packages go though, from simple name/id, package description, configured or installed packages.

Not all kinds of packages can be uniquely identified by a PackageIdentifier. In particular, installed packages cannot, there may be many installed instances of the same source package.

Minimal complete definition

packageId

Methods

packageId :: pkg -> PackageIdentifier #

class HasMungedPackageId pkg where #

Minimal complete definition

mungedId

Methods

mungedId :: pkg -> MungedPackageId #

class Package pkg => HasUnitId pkg where #

Packages that have an installed unit ID

Minimal complete definition

installedUnitId

Methods

installedUnitId :: pkg -> UnitId #

Instances
HasUnitId ReadyComponent 
Instance details

Methods

installedUnitId :: ReadyComponent -> UnitId #

HasUnitId InstalledPackageInfo 
Instance details

class HasUnitId pkg => PackageInstalled pkg where #

Class of installed packages.

The primary data type which is an instance of this package is InstalledPackageInfo, but when we are doing install plans in Cabal install we may have other, installed package-like things which contain more metadata. Installed packages have exact dependencies installedDepends.

Minimal complete definition

installedDepends

Methods

installedDepends :: pkg -> [UnitId] #

data Dependency #

Describes a dependency on a source package (API)

Instances
Eq Dependency 
Instance details
Data Dependency 
Instance details

Methods

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

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

toConstr :: Dependency -> Constr #

dataTypeOf :: Dependency -> DataType #

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

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

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

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

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

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

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

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

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

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

Read Dependency 
Instance details
Show Dependency 
Instance details
Generic Dependency 
Instance details

Associated Types

type Rep Dependency :: * -> * #

Text Dependency 
Instance details
Parsec Dependency 
Instance details

Methods

parsec :: CabalParsing m => m Dependency #

Pretty Dependency 
Instance details

Methods

pretty :: Dependency -> Doc #

Binary Dependency 
Instance details
NFData Dependency 
Instance details

Methods

rnf :: Dependency -> () #

type Rep Dependency 
Instance details

data Module #

A module identity uniquely identifies a Haskell module by qualifying a ModuleName with the UnitId which defined it. This type distinguishes between two packages which provide a module with the same name, or a module from the same package compiled with different dependencies. There are a few cases where Cabal needs to know about module identities, e.g., when writing out reexported modules in the InstalledPackageInfo.

Instances
Eq Module 
Instance details

Methods

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

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

Data Module 
Instance details

Methods

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

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

toConstr :: Module -> Constr #

dataTypeOf :: Module -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Module 
Instance details
Read Module 
Instance details
Show Module 
Instance details
Generic Module 
Instance details

Associated Types

type Rep Module :: * -> * #

Methods

from :: Module -> Rep Module x #

to :: Rep Module x -> Module #

Text Module 
Instance details

Methods

disp :: Module -> Doc #

parse :: ReadP r Module #

Parsec Module 
Instance details

Methods

parsec :: CabalParsing m => m Module #

Pretty Module 
Instance details

Methods

pretty :: Module -> Doc #

Binary Module 
Instance details

Methods

put :: Module -> Put #

get :: Get Module #

putList :: [Module] -> Put #

NFData Module 
Instance details

Methods

rnf :: Module -> () #

type Rep Module 
Instance details

unsafeMkDefUnitId :: UnitId -> DefUnitId #

Unsafely create a DefUnitId from a UnitId. Your responsibility is to ensure that the DefUnitId invariant holds.

getHSLibraryName :: UnitId -> String #

Returns library name prefixed with HS, suitable for filenames

mkLegacyUnitId :: PackageId -> UnitId #

Make an old-style UnitId from a package identifier. Assumed to be for the public library

newSimpleUnitId :: ComponentId -> UnitId #

Create a unit identity with no associated hash directly from a ComponentId.

unUnitId :: UnitId -> String #

If you need backwards compatibility, consider using display instead, which is supported by all versions of Cabal.

data UnitId #

A unit identifier identifies a (possibly instantiated) package/component that can be installed the installed package database. There are several types of components that can be installed:

  • A traditional library with no holes, so that unitIdHash is Nothing. In the absence of Backpack, UnitId is the same as a ComponentId.
  • An indefinite, Backpack library with holes. In this case, unitIdHash is still Nothing, but in the install, there are only interfaces, no compiled objects.
  • An instantiated Backpack library with all the holes filled in. unitIdHash is a Just a hash of the instantiating mapping.

A unit is a component plus the additional information on how the holes are filled in. Thus there is a one to many relationship: for a particular component there are many different ways of filling in the holes, and each different combination is a unit (and has a separate UnitId).

UnitId is distinct from OpenUnitId, in that it is always installed, whereas OpenUnitId are intermediate unit identities that arise during mixin linking, and don't necessarily correspond to any actually installed unit. Since the mapping is not actually recorded in a UnitId, you can't actually substitute over them (but you can substitute over OpenUnitId). See also Distribution.Backpack.FullUnitId for a mechanism for expanding an instantiated UnitId to retrieve its mapping.

Backwards compatibility note: if you need to get the string representation of a UnitId to pass, e.g., as a -package-id flag, use the display function, which will work on all versions of Cabal.

Instances
Eq UnitId 
Instance details

Methods

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

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

Data UnitId 
Instance details

Methods

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

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

toConstr :: UnitId -> Constr #

dataTypeOf :: UnitId -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord UnitId 
Instance details
Read UnitId 
Instance details
Show UnitId 
Instance details
IsString UnitId

mkUnitId

Since: 2.0.0.2

Instance details

Methods

fromString :: String -> UnitId #

Generic UnitId 
Instance details

Associated Types

type Rep UnitId :: * -> * #

Methods

from :: UnitId -> Rep UnitId x #

to :: Rep UnitId x -> UnitId #

Text UnitId 
Instance details

Methods

disp :: UnitId -> Doc #

parse :: ReadP r UnitId #

Parsec UnitId

The textual format for UnitId coincides with the format GHC accepts for -package-id.

Instance details

Methods

parsec :: CabalParsing m => m UnitId #

Pretty UnitId

The textual format for UnitId coincides with the format GHC accepts for -package-id.

Instance details

Methods

pretty :: UnitId -> Doc #

Binary UnitId 
Instance details

Methods

put :: UnitId -> Put #

get :: Get UnitId #

putList :: [UnitId] -> Put #

NFData UnitId 
Instance details

Methods

rnf :: UnitId -> () #

type Rep UnitId 
Instance details
type Rep UnitId = D1 (MetaData "UnitId" "Distribution.Types.UnitId" "Cabal-2.2.0.0" True) (C1 (MetaCons "UnitId" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ShortText)))

data DefUnitId #

A UnitId for a definite package. The DefUnitId invariant says that a UnitId identified this way is definite; i.e., it has no unfilled holes.

Instances
Eq DefUnitId 
Instance details
Data DefUnitId 
Instance details

Methods

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

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

toConstr :: DefUnitId -> Constr #

dataTypeOf :: DefUnitId -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord DefUnitId 
Instance details
Read DefUnitId 
Instance details
Show DefUnitId 
Instance details
Generic DefUnitId 
Instance details

Associated Types

type Rep DefUnitId :: * -> * #

Text DefUnitId 
Instance details
Parsec DefUnitId 
Instance details

Methods

parsec :: CabalParsing m => m DefUnitId #

Pretty DefUnitId 
Instance details

Methods

pretty :: DefUnitId -> Doc #

Binary DefUnitId 
Instance details
NFData DefUnitId 
Instance details

Methods

rnf :: DefUnitId -> () #

type Rep DefUnitId 
Instance details
type Rep DefUnitId = D1 (MetaData "DefUnitId" "Distribution.Types.UnitId" "Cabal-2.2.0.0" True) (C1 (MetaCons "DefUnitId" PrefixI True) (S1 (MetaSel (Just "unDefUnitId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UnitId)))

type PackageId = PackageIdentifier #

Type alias so we can use the shorter name PackageId.

data PackageIdentifier #

The name and version of a package.

Constructors

PackageIdentifier 

Fields

Instances
Eq PackageIdentifier 
Instance details
Data PackageIdentifier 
Instance details

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 :: (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 #

Ord PackageIdentifier 
Instance details
Read PackageIdentifier 
Instance details
Show PackageIdentifier 
Instance details
Generic PackageIdentifier 
Instance details

Associated Types

type Rep PackageIdentifier :: * -> * #

Package PackageIdentifier 
Instance details
Text PackageIdentifier 
Instance details
Pretty PackageIdentifier 
Instance details
Binary PackageIdentifier 
Instance details
NFData PackageIdentifier 
Instance details

Methods

rnf :: PackageIdentifier -> () #

type Rep PackageIdentifier 
Instance details
type Rep PackageIdentifier = D1 (MetaData "PackageIdentifier" "Distribution.Types.PackageId" "Cabal-2.2.0.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)))

mkPackageName :: String -> PackageName #

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

data PackageName #

A package name.

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

This type is opaque since Cabal-2.0

Since: 2.0.0.2

Instances
Eq PackageName 
Instance details
Data PackageName 
Instance details

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 :: (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 #

Ord PackageName 
Instance details
Read PackageName 
Instance details
Show PackageName 
Instance details
IsString PackageName

mkPackageName

Since: 2.0.0.2

Instance details
Generic PackageName 
Instance details

Associated Types

type Rep PackageName :: * -> * #

Text PackageName 
Instance details
Parsec PackageName 
Instance details

Methods

parsec :: CabalParsing m => m PackageName #

Pretty PackageName 
Instance details

Methods

pretty :: PackageName -> Doc #

Binary PackageName 
Instance details
NFData PackageName 
Instance details

Methods

rnf :: PackageName -> () #

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

unknownCompilerInfo :: CompilerId -> AbiTag -> CompilerInfo #

Make a CompilerInfo of which only the known information is its CompilerId, its AbiTag and that it does not claim to be compatible with other compiler id's.

defaultCompilerFlavor :: Maybe CompilerFlavor #

The default compiler flavour to pick when compiling stuff. This defaults to the compiler used to build the Cabal lib.

However if it's not a recognised compiler then it's Nothing and the user will have to specify which compiler they want.

parseCompilerFlavorCompat :: ReadP r CompilerFlavor #

Like classifyCompilerFlavor but compatible with the old ReadS parser.

It is compatible in the sense that it accepts only the same strings, eg GHC but not "ghc". However other strings get mapped to OtherCompiler. The point of this is that we do not allow extra valid values that would upset older Cabal versions that had a stricter parser however we cope with new values more gracefully so that we'll be able to introduce new value in future without breaking things so much.

data CompilerFlavor #

Instances
Eq CompilerFlavor 
Instance details
Data CompilerFlavor 
Instance details

Methods

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

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

toConstr :: CompilerFlavor -> Constr #

dataTypeOf :: CompilerFlavor -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord CompilerFlavor 
Instance details
Read CompilerFlavor 
Instance details
Show CompilerFlavor 
Instance details
Generic CompilerFlavor 
Instance details

Associated Types

type Rep CompilerFlavor :: * -> * #

Text CompilerFlavor 
Instance details
Parsec CompilerFlavor 
Instance details
Pretty CompilerFlavor 
Instance details

Methods

pretty :: CompilerFlavor -> Doc #

Binary CompilerFlavor 
Instance details
NFData CompilerFlavor 
Instance details

Methods

rnf :: CompilerFlavor -> () #

type Rep CompilerFlavor 
Instance details
type Rep CompilerFlavor = D1 (MetaData "CompilerFlavor" "Distribution.Compiler" "Cabal-2.2.0.0" False) (((C1 (MetaCons "GHC" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "GHCJS" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "NHC" PrefixI False) (U1 :: * -> *))) :+: (C1 (MetaCons "YHC" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "Hugs" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "HBC" PrefixI False) (U1 :: * -> *)))) :+: ((C1 (MetaCons "Helium" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "JHC" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "LHC" PrefixI False) (U1 :: * -> *))) :+: (C1 (MetaCons "UHC" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "HaskellSuite" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "OtherCompiler" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))))

data CompilerId #

Instances
Eq CompilerId 
Instance details
Ord CompilerId 
Instance details
Read CompilerId 
Instance details
Show CompilerId 
Instance details
Generic CompilerId 
Instance details

Associated Types

type Rep CompilerId :: * -> * #

Text CompilerId 
Instance details
Binary CompilerId 
Instance details
NFData CompilerId 
Instance details

Methods

rnf :: CompilerId -> () #

type Rep CompilerId 
Instance details

data CompilerInfo #

Compiler information used for resolving configurations. Some fields can be set to Nothing to indicate that the information is unknown.

Constructors

CompilerInfo 

Fields

Instances
Read CompilerInfo 
Instance details
Show CompilerInfo 
Instance details
Generic CompilerInfo 
Instance details

Associated Types

type Rep CompilerInfo :: * -> * #

Binary CompilerInfo 
Instance details
type Rep CompilerInfo 
Instance details

data AbiTag #

Constructors

NoAbiTag 
AbiTag String 
Instances
Eq AbiTag 
Instance details

Methods

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

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

Read AbiTag 
Instance details
Show AbiTag 
Instance details
Generic AbiTag 
Instance details

Associated Types

type Rep AbiTag :: * -> * #

Methods

from :: AbiTag -> Rep AbiTag x #

to :: Rep AbiTag x -> AbiTag #

Text AbiTag 
Instance details

Methods

disp :: AbiTag -> Doc #

parse :: ReadP r AbiTag #

Binary AbiTag 
Instance details

Methods

put :: AbiTag -> Put #

get :: Get AbiTag #

putList :: [AbiTag] -> Put #

type Rep AbiTag 
Instance details
type Rep AbiTag = D1 (MetaData "AbiTag" "Distribution.Compiler" "Cabal-2.2.0.0" False) (C1 (MetaCons "NoAbiTag" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "AbiTag" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))

deprecatedExtensions :: [(Extension, Maybe Extension)] #

Extensions that have been deprecated, possibly paired with another extension that replaces it.

data Language #

This represents a Haskell language dialect.

Language Extensions are interpreted relative to one of these base languages.

Constructors

Haskell98

The Haskell 98 language as defined by the Haskell 98 report. http://haskell.org/onlinereport/

Haskell2010

The Haskell 2010 language as defined by the Haskell 2010 report. http://www.haskell.org/onlinereport/haskell2010

UnknownLanguage String

An unknown language, identified by its name.

Instances
Eq Language 
Instance details
Data Language 
Instance details

Methods

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

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

toConstr :: Language -> Constr #

dataTypeOf :: Language -> DataType #

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

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

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

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

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

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

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

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

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

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

Read Language 
Instance details
Show Language 
Instance details
Generic Language 
Instance details

Associated Types

type Rep Language :: * -> * #

Methods

from :: Language -> Rep Language x #

to :: Rep Language x -> Language #

Text Language 
Instance details

Methods

disp :: Language -> Doc #

parse :: ReadP r Language #

Parsec Language 
Instance details

Methods

parsec :: CabalParsing m => m Language #

Pretty Language 
Instance details

Methods

pretty :: Language -> Doc #

Binary Language 
Instance details

Methods

put :: Language -> Put #

get :: Get Language #

putList :: [Language] -> Put #

NFData Language 
Instance details

Methods

rnf :: Language -> () #

type Rep Language 
Instance details
type Rep Language = D1 (MetaData "Language" "Language.Haskell.Extension" "Cabal-2.2.0.0" False) (C1 (MetaCons "Haskell98" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "Haskell2010" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "UnknownLanguage" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))

data Extension #

This represents language extensions beyond a base Language definition (such as Haskell98) that are supported by some implementations, usually in some special mode.

Where applicable, references are given to an implementation's official documentation.

Constructors

EnableExtension KnownExtension

Enable a known extension

DisableExtension KnownExtension

Disable a known extension

UnknownExtension String

An unknown extension, identified by the name of its LANGUAGE pragma.

Instances
Eq Extension 
Instance details
Data Extension 
Instance details

Methods

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

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

toConstr :: Extension -> Constr #

dataTypeOf :: Extension -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Extension 
Instance details
Read Extension 
Instance details
Show Extension 
Instance details
Generic Extension 
Instance details

Associated Types

type Rep Extension :: * -> * #

Text Extension 
Instance details
Parsec Extension 
Instance details

Methods

parsec :: CabalParsing m => m Extension #

Pretty Extension 
Instance details

Methods

pretty :: Extension -> Doc #

Binary Extension 
Instance details
NFData Extension 
Instance details

Methods

rnf :: Extension -> () #

type Rep Extension 
Instance details

data KnownExtension #

Constructors

OverlappingInstances

Allow overlapping class instances, provided there is a unique most specific instance for each use.

UndecidableInstances

Ignore structural rules guaranteeing the termination of class instance resolution. Termination is guaranteed by a fixed-depth recursion stack, and compilation may fail if this depth is exceeded.

IncoherentInstances

Implies OverlappingInstances. Allow the implementation to choose an instance even when it is possible that further instantiation of types will lead to a more specific instance being applicable.

DoRec

(deprecated) Deprecated in favour of RecursiveDo.

Old description: Allow recursive bindings in do blocks, using the rec keyword. See also RecursiveDo.

RecursiveDo

Allow recursive bindings in do blocks, using the rec keyword, or mdo, a variant of do.

ParallelListComp

Provide syntax for writing list comprehensions which iterate over several lists together, like the zipWith family of functions.

MultiParamTypeClasses

Allow multiple parameters in a type class.

MonomorphismRestriction

Enable the dreaded monomorphism restriction.

FunctionalDependencies

Allow a specification attached to a multi-parameter type class which indicates that some parameters are entirely determined by others. The implementation will check that this property holds for the declared instances, and will use this property to reduce ambiguity in instance resolution.

Rank2Types

(deprecated) A synonym for RankNTypes.

Old description: Like RankNTypes but does not allow a higher-rank type to itself appear on the left of a function arrow.

RankNTypes

Allow a universally-quantified type to occur on the left of a function arrow.

PolymorphicComponents

(deprecated) A synonym for RankNTypes.

Old description: Allow data constructors to have polymorphic arguments. Unlike RankNTypes, does not allow this for ordinary functions.

ExistentialQuantification

Allow existentially-quantified data constructors.

ScopedTypeVariables

Cause a type variable in a signature, which has an explicit forall quantifier, to scope over the definition of the accompanying value declaration.

PatternSignatures

Deprecated, use ScopedTypeVariables instead.

ImplicitParams

Enable implicit function parameters with dynamic scope.

FlexibleContexts

Relax some restrictions on the form of the context of a type signature.

FlexibleInstances

Relax some restrictions on the form of the context of an instance declaration.

EmptyDataDecls

Allow data type declarations with no constructors.

CPP

Run the C preprocessor on Haskell source code.

KindSignatures

Allow an explicit kind signature giving the kind of types over which a type variable ranges.

BangPatterns

Enable a form of pattern which forces evaluation before an attempted match, and a form of strict let/where binding.

TypeSynonymInstances

Allow type synonyms in instance heads.

TemplateHaskell

Enable Template Haskell, a system for compile-time metaprogramming.

ForeignFunctionInterface

Enable the Foreign Function Interface. In GHC, implements the standard Haskell 98 Foreign Function Interface Addendum, plus some GHC-specific extensions.

Arrows

Enable arrow notation.

Generics

(deprecated) Enable generic type classes, with default instances defined in terms of the algebraic structure of a type.

ImplicitPrelude

Enable the implicit importing of the module Prelude. When disabled, when desugaring certain built-in syntax into ordinary identifiers, use whatever is in scope rather than the Prelude -- version.

NamedFieldPuns

Enable syntax for implicitly binding local names corresponding to the field names of a record. Puns bind specific names, unlike RecordWildCards.

PatternGuards

Enable a form of guard which matches a pattern and binds variables.

GeneralizedNewtypeDeriving

Allow a type declared with newtype to use deriving for any class with an instance for the underlying type.

ExtensibleRecords

Enable the "Trex" extensible records system.

RestrictedTypeSynonyms

Enable type synonyms which are transparent in some definitions and opaque elsewhere, as a way of implementing abstract datatypes.

HereDocuments

Enable an alternate syntax for string literals, with string templating.

MagicHash

Allow the character # as a postfix modifier on identifiers. Also enables literal syntax for unboxed values.

TypeFamilies

Allow data types and type synonyms which are indexed by types, i.e. ad-hoc polymorphism for types.

StandaloneDeriving

Allow a standalone declaration which invokes the type class deriving mechanism.

UnicodeSyntax

Allow certain Unicode characters to stand for certain ASCII character sequences, e.g. keywords and punctuation.

UnliftedFFITypes

Allow the use of unboxed types as foreign types, e.g. in foreign import and foreign export.

InterruptibleFFI

Enable interruptible FFI.

CApiFFI

Allow use of CAPI FFI calling convention (foreign import capi).

LiberalTypeSynonyms

Defer validity checking of types until after expanding type synonyms, relaxing the constraints on how synonyms may be used.

TypeOperators

Allow the name of a type constructor, type class, or type variable to be an infix operator. * https://www.haskell.org/ghc/docs/latest/html/users_guide/glasgow_exts.html#ghc-flag--XTypeOperators

RecordWildCards

Enable syntax for implicitly binding local names corresponding to the field names of a record. A wildcard binds all unmentioned names, unlike NamedFieldPuns.

RecordPuns

Deprecated, use NamedFieldPuns instead.

DisambiguateRecordFields

Allow a record field name to be disambiguated by the type of the record it's in.

TraditionalRecordSyntax

Enable traditional record syntax (as supported by Haskell 98)

OverloadedStrings

Enable overloading of string literals using a type class, much like integer literals.

GADTs

Enable generalized algebraic data types, in which type variables may be instantiated on a per-constructor basis. Implies GADTSyntax.

GADTSyntax

Enable GADT syntax for declaring ordinary algebraic datatypes.

MonoPatBinds

(deprecated) Has no effect.

Old description: Make pattern bindings monomorphic.

RelaxedPolyRec

Relax the requirements on mutually-recursive polymorphic functions.

ExtendedDefaultRules

Allow default instantiation of polymorphic types in more situations.

UnboxedTuples

Enable unboxed tuples.

DeriveDataTypeable

Enable deriving for classes Typeable and Data.

DeriveGeneric

Enable deriving for Generic and Generic1.

DefaultSignatures

Enable support for default signatures.

InstanceSigs

Allow type signatures to be specified in instance declarations.

ConstrainedClassMethods

Allow a class method's type to place additional constraints on a class type variable.

PackageImports

Allow imports to be qualified by the package name the module is intended to be imported from, e.g.

import "network" Network.Socket
ImpredicativeTypes

(deprecated) Allow a type variable to be instantiated at a polymorphic type.

NewQualifiedOperators

(deprecated) Change the syntax for qualified infix operators.

PostfixOperators

Relax the interpretation of left operator sections to allow unary postfix operators.

QuasiQuotes

Enable quasi-quotation, a mechanism for defining new concrete syntax for expressions and patterns.

TransformListComp

Enable generalized list comprehensions, supporting operations such as sorting and grouping.

MonadComprehensions

Enable monad comprehensions, which generalise the list comprehension syntax to work for any monad.

ViewPatterns

Enable view patterns, which match a value by applying a function and matching on the result.

XmlSyntax

Allow concrete XML syntax to be used in expressions and patterns, as per the Haskell Server Pages extension language: http://www.haskell.org/haskellwiki/HSP. The ideas behind it are discussed in the paper "Haskell Server Pages through Dynamic Loading" by Niklas Broberg, from Haskell Workshop '05.

RegularPatterns

Allow regular pattern matching over lists, as discussed in the paper "Regular Expression Patterns" by Niklas Broberg, Andreas Farre and Josef Svenningsson, from ICFP '04.

TupleSections

Enable the use of tuple sections, e.g. (, True) desugars into x -> (x, True).

GHCForeignImportPrim

Allow GHC primops, written in C--, to be imported into a Haskell file.

NPlusKPatterns

Support for patterns of the form n + k, where k is an integer literal.

DoAndIfThenElse

Improve the layout rule when if expressions are used in a do block.

MultiWayIf

Enable support for multi-way if-expressions.

LambdaCase

Enable support lambda-case expressions.

RebindableSyntax

Makes much of the Haskell sugar be desugared into calls to the function with a particular name that is in scope.

ExplicitForAll

Make forall a keyword in types, which can be used to give the generalisation explicitly.

DatatypeContexts

Allow contexts to be put on datatypes, e.g. the Eq a in data Eq a => Set a = NilSet | ConsSet a (Set a).

MonoLocalBinds

Local (let and where) bindings are monomorphic.

DeriveFunctor

Enable deriving for the Functor class.

DeriveTraversable

Enable deriving for the Traversable class.

DeriveFoldable

Enable deriving for the Foldable class.

NondecreasingIndentation

Enable non-decreasing indentation for do blocks.

SafeImports

Allow imports to be qualified with a safe keyword that requires the imported module be trusted as according to the Safe Haskell definition of trust.

import safe Network.Socket
Safe

Compile a module in the Safe, Safe Haskell mode -- a restricted form of the Haskell language to ensure type safety.

Trustworthy

Compile a module in the Trustworthy, Safe Haskell mode -- no restrictions apply but the module is marked as trusted as long as the package the module resides in is trusted.

Unsafe

Compile a module in the Unsafe, Safe Haskell mode so that modules compiled using Safe, Safe Haskell mode can't import it.

ConstraintKinds

Allow type classimplicit parameterequality constraints to be used as types with the special kind constraint. Also generalise the (ctxt => ty) syntax so that any type of kind constraint can occur before the arrow.

PolyKinds

Enable kind polymorphism.

DataKinds

Enable datatype promotion.

ParallelArrays

Enable parallel arrays syntax ([:, :]) for Data Parallel Haskell.

RoleAnnotations

Enable explicit role annotations, like in (type role Foo representational representational).

OverloadedLists

Enable overloading of list literals, arithmetic sequences and list patterns using the IsList type class.

EmptyCase

Enable case expressions that have no alternatives. Also applies to lambda-case expressions if they are enabled.

AutoDeriveTypeable

(deprecated) Deprecated in favour of DeriveDataTypeable.

Old description: Triggers the generation of derived Typeable instances for every datatype and type class declaration.

NegativeLiterals

Desugars negative literals directly (without using negate).

BinaryLiterals

Allow the use of binary integer literal syntax (e.g. 0b11001001 to denote 201).

NumDecimals

Allow the use of floating literal syntax for all instances of Num, including Int and Integer.

NullaryTypeClasses

Enable support for type classes with no type parameter.

ExplicitNamespaces

Enable explicit namespaces in module import/export lists.

AllowAmbiguousTypes

Allow the user to write ambiguous types, and the type inference engine to infer them.

JavaScriptFFI

Enable foreign import javascript.

PatternSynonyms

Allow giving names to and abstracting over patterns.

PartialTypeSignatures

Allow anonymous placeholders (underscore) inside type signatures. The type inference engine will generate a message describing the type inferred at the hole's location.

NamedWildCards

Allow named placeholders written with a leading underscore inside type signatures. Wildcards with the same name unify to the same type.

DeriveAnyClass

Enable deriving for any class.

DeriveLift

Enable deriving for the Lift class.

StaticPointers

Enable support for 'static pointers' (and the static keyword) to refer to globally stable names, even across different programs.

StrictData

Switches data type declarations to be strict by default (as if they had a bang using BangPatterns), and allow opt-in field laziness using ~.

Strict

Switches all pattern bindings to be strict by default (as if they had a bang using BangPatterns), ordinary patterns are recovered using ~. Implies StrictData.

ApplicativeDo

Allows do-notation for types that are Applicative as well as Monad. When enabled, desugaring do notation tries to use (*) and fmap and join as far as possible.

DuplicateRecordFields

Allow records to use duplicated field labels for accessors.

TypeApplications

Enable explicit type applications with the syntax id @Int.

TypeInType

Dissolve the distinction between types and kinds, allowing the compiler to reason about kind equality and therefore enabling GADTs to be promoted to the type-level.

UndecidableSuperClasses

Allow recursive (and therefore undecideable) super-class relationships.

MonadFailDesugaring

A temporary extension to help library authors check if their code will compile with the new planned desugaring of fail.

TemplateHaskellQuotes

A subset of TemplateHaskell including only quoting.

OverloadedLabels

Allows use of the #label syntax.

TypeFamilyDependencies

Allow functional dependency annotations on type families to declare them as injective.

DerivingStrategies

Allow multiple deriving clauses, each optionally qualified with a strategy.

UnboxedSums

Enable the use of unboxed sum syntax.

HexFloatLiterals

Allow use of hexadecimal literal notation for floating-point values.

Instances
Bounded KnownExtension 
Instance details
Enum KnownExtension 
Instance details
Eq KnownExtension 
Instance details
Data KnownExtension 
Instance details

Methods

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

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

toConstr :: KnownExtension -> Constr #

dataTypeOf :: KnownExtension -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord KnownExtension 
Instance details
Read KnownExtension 
Instance details
Show KnownExtension 
Instance details
Generic KnownExtension 
Instance details

Associated Types

type Rep KnownExtension :: * -> * #

Text KnownExtension 
Instance details
Pretty KnownExtension 
Instance details

Methods

pretty :: KnownExtension -> Doc #

Binary KnownExtension 
Instance details
NFData KnownExtension 
Instance details

Methods

rnf :: KnownExtension -> () #

type Rep KnownExtension 
Instance details
type Rep KnownExtension = D1 (MetaData "KnownExtension" "Language.Haskell.Extension" "Cabal-2.2.0.0" False) ((((((C1 (MetaCons "OverlappingInstances" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "UndecidableInstances" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "IncoherentInstances" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "DoRec" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "RecursiveDo" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "ParallelListComp" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MultiParamTypeClasses" PrefixI False) (U1 :: * -> *)))) :+: (((C1 (MetaCons "MonomorphismRestriction" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "FunctionalDependencies" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "Rank2Types" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "RankNTypes" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "PolymorphicComponents" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ExistentialQuantification" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "ScopedTypeVariables" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "PatternSignatures" PrefixI False) (U1 :: * -> *))))) :+: (((C1 (MetaCons "ImplicitParams" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "FlexibleContexts" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "FlexibleInstances" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "EmptyDataDecls" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "CPP" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "KindSignatures" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "BangPatterns" PrefixI False) (U1 :: * -> *)))) :+: (((C1 (MetaCons "TypeSynonymInstances" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "TemplateHaskell" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "ForeignFunctionInterface" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "Arrows" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "Generics" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ImplicitPrelude" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "NamedFieldPuns" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "PatternGuards" PrefixI False) (U1 :: * -> *)))))) :+: ((((C1 (MetaCons "GeneralizedNewtypeDeriving" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "ExtensibleRecords" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "RestrictedTypeSynonyms" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "HereDocuments" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MagicHash" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "TypeFamilies" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "StandaloneDeriving" PrefixI False) (U1 :: * -> *)))) :+: (((C1 (MetaCons "UnicodeSyntax" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "UnliftedFFITypes" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "InterruptibleFFI" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "CApiFFI" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "LiberalTypeSynonyms" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "TypeOperators" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "RecordWildCards" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "RecordPuns" PrefixI False) (U1 :: * -> *))))) :+: ((((C1 (MetaCons "DisambiguateRecordFields" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "TraditionalRecordSyntax" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "OverloadedStrings" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "GADTs" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "GADTSyntax" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MonoPatBinds" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "RelaxedPolyRec" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ExtendedDefaultRules" PrefixI False) (U1 :: * -> *)))) :+: (((C1 (MetaCons "UnboxedTuples" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "DeriveDataTypeable" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "DeriveGeneric" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "DefaultSignatures" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "InstanceSigs" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ConstrainedClassMethods" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "PackageImports" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ImpredicativeTypes" PrefixI False) (U1 :: * -> *))))))) :+: (((((C1 (MetaCons "NewQualifiedOperators" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "PostfixOperators" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "QuasiQuotes" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "TransformListComp" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MonadComprehensions" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "ViewPatterns" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "XmlSyntax" PrefixI False) (U1 :: * -> *)))) :+: (((C1 (MetaCons "RegularPatterns" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "TupleSections" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "GHCForeignImportPrim" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "NPlusKPatterns" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "DoAndIfThenElse" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MultiWayIf" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "LambdaCase" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "RebindableSyntax" PrefixI False) (U1 :: * -> *))))) :+: (((C1 (MetaCons "ExplicitForAll" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "DatatypeContexts" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MonoLocalBinds" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "DeriveFunctor" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "DeriveTraversable" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "DeriveFoldable" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "NondecreasingIndentation" PrefixI False) (U1 :: * -> *)))) :+: (((C1 (MetaCons "SafeImports" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "Safe" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "Trustworthy" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "Unsafe" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "ConstraintKinds" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "PolyKinds" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "DataKinds" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ParallelArrays" PrefixI False) (U1 :: * -> *)))))) :+: ((((C1 (MetaCons "RoleAnnotations" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "OverloadedLists" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "EmptyCase" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "AutoDeriveTypeable" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "NegativeLiterals" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "BinaryLiterals" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "NumDecimals" PrefixI False) (U1 :: * -> *)))) :+: (((C1 (MetaCons "NullaryTypeClasses" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ExplicitNamespaces" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "AllowAmbiguousTypes" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "JavaScriptFFI" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "PatternSynonyms" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "PartialTypeSignatures" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "NamedWildCards" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "DeriveAnyClass" PrefixI False) (U1 :: * -> *))))) :+: ((((C1 (MetaCons "DeriveLift" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "StaticPointers" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "StrictData" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "Strict" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "ApplicativeDo" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "DuplicateRecordFields" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "TypeApplications" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "TypeInType" PrefixI False) (U1 :: * -> *)))) :+: (((C1 (MetaCons "UndecidableSuperClasses" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MonadFailDesugaring" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "TemplateHaskellQuotes" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "OverloadedLabels" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "TypeFamilyDependencies" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "DerivingStrategies" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "UnboxedSums" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "HexFloatLiterals" PrefixI False) (U1 :: * -> *))))))))

licenseFromSPDX :: License -> License #

Convert License to License,

This is lossy conversion. We try our best.

>>> licenseFromSPDX . licenseToSPDX $ BSD3
BSD3
>>> licenseFromSPDX . licenseToSPDX $ GPL (Just (mkVersion [3]))
GPL (Just (mkVersion [3]))
>>> licenseFromSPDX . licenseToSPDX $ PublicDomain
UnknownLicense "LicenseRefPublicDomain"
>>> licenseFromSPDX $ SPDX.License $ SPDX.simpleLicenseExpression SPDX.EUPL_1_1
UnknownLicense "EUPL-1.1"
>>> licenseFromSPDX . licenseToSPDX $ AllRightsReserved
AllRightsReserved
>>> licenseFromSPDX <$> simpleParsec "BSD-3-Clause OR GPL-3.0-only"
Just (UnknownLicense "BSD3ClauseORGPL30only")

Since: 2.2.0.0

licenseToSPDX :: License -> License #

Convert old License to SPDX License. Non-SPDX licenses are converted to LicenseRef.

Since: 2.2.0.0

knownLicenses :: [License] #

The list of all currently recognised licenses.

data License #

Indicates the license under which a package's source code is released. Versions of the licenses not listed here will be rejected by Hackage and cause cabal check to issue a warning.

Constructors

GPL (Maybe Version)

GNU General Public License, version 2 or version 3.

AGPL (Maybe Version)

GNU Affero General Public License, version 3.

LGPL (Maybe Version)

GNU Lesser General Public License, version 2.1 or version 3.

BSD2

2-clause BSD license.

BSD3

3-clause BSD license.

BSD4

4-clause BSD license. This license has not been approved by the OSI and is incompatible with the GNU GPL. It is provided for historical reasons and should be avoided.

MIT

MIT license.

ISC

ISC license

MPL Version

Mozilla Public License, version 2.0.

Apache (Maybe Version)

Apache License, version 2.0.

PublicDomain

The author of a package disclaims any copyright to its source code and dedicates it to the public domain. This is not a software license. Please note that it is not possible to dedicate works to the public domain in every jurisdiction, nor is a work that is in the public domain in one jurisdiction necessarily in the public domain elsewhere.

AllRightsReserved

Explicitly 'All Rights Reserved', eg for proprietary software. The package may not be legally modified or redistributed by anyone but the rightsholder.

UnspecifiedLicense

No license specified which legally defaults to 'All Rights Reserved'. The package may not be legally modified or redistributed by anyone but the rightsholder.

OtherLicense

Any other software license.

UnknownLicense String

Indicates an erroneous license name.

Instances
Eq License 
Instance details

Methods

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

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

Data License 
Instance details

Methods

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

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

toConstr :: License -> Constr #

dataTypeOf :: License -> DataType #

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

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

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

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

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

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

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

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

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

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

Read License 
Instance details
Show License 
Instance details
Generic License 
Instance details

Associated Types

type Rep License :: * -> * #

Methods

from :: License -> Rep License x #

to :: Rep License x -> License #

Text License 
Instance details

Methods

disp :: License -> Doc #

parse :: ReadP r License #

Parsec License 
Instance details

Methods

parsec :: CabalParsing m => m License #

Pretty License 
Instance details

Methods

pretty :: License -> Doc #

Binary License 
Instance details

Methods

put :: License -> Put #

get :: Get License #

putList :: [License] -> Put #

NFData License 
Instance details

Methods

rnf :: License -> () #

type Rep License 
Instance details
type Rep License = D1 (MetaData "License" "Distribution.License" "Cabal-2.2.0.0" False) (((C1 (MetaCons "GPL" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Version))) :+: (C1 (MetaCons "AGPL" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Version))) :+: C1 (MetaCons "LGPL" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Version))))) :+: ((C1 (MetaCons "BSD2" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "BSD3" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "BSD4" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MIT" PrefixI False) (U1 :: * -> *)))) :+: (((C1 (MetaCons "ISC" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MPL" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Version))) :+: (C1 (MetaCons "Apache" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Version))) :+: C1 (MetaCons "PublicDomain" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "AllRightsReserved" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "UnspecifiedLicense" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "OtherLicense" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "UnknownLicense" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))))

foldVersionRange' #

Arguments

:: a

"-any" version

-> (Version -> a)
"== v"
-> (Version -> a)
"> v"
-> (Version -> a)
"< v"
-> (Version -> a)
">= v"
-> (Version -> a)
"<= v"
-> (Version -> Version -> a)

"== v.*" wildcard. The function is passed the inclusive lower bound and the exclusive upper bounds of the range defined by the wildcard.

-> (Version -> Version -> a)

"^>= v" major upper bound The function is passed the inclusive lower bound and the exclusive major upper bounds of the range defined by this operator.

-> (a -> a -> a)

"_ || _" union

-> (a -> a -> a)

"_ && _" intersection

-> (a -> a)

"(_)" parentheses

-> VersionRange 
-> a 

An extended variant of foldVersionRange that also provides a view of the expression in which the syntactic sugar ">= v", "<= v" and "== v.*" is presented explicitly rather than in terms of the other basic syntax.

removeLowerBound :: VersionRange -> VersionRange #

Given a version range, remove the lowest lower bound. Example: (>= 1 && || (= 4 && < 5) is converted to (>= 0 && || (= 4 && < 5).

removeUpperBound :: VersionRange -> VersionRange #

Given a version range, remove the highest upper bound. Example: (>= 1 && < 3) || (>= 4 && < 5) is converted to (>= 1 && || (= 4).

invertVersionRange :: VersionRange -> VersionRange #

The inverse of a version range

  withinRange v' (invertVersionRange vr)
= not (withinRange v' vr)

differenceVersionRanges :: VersionRange -> VersionRange -> VersionRange #

The difference of two version ranges

  withinRange v' (differenceVersionRanges vr1 vr2)
= withinRange v' vr1 && not (withinRange v' vr2)

Since: 1.24.1.0

simplifyVersionRange :: VersionRange -> VersionRange #

Simplify a VersionRange expression. For non-empty version ranges this produces a canonical form. Empty or inconsistent version ranges are left as-is because that provides more information.

If you need a canonical form use fromVersionIntervals . toVersionIntervals

It satisfies the following properties:

withinRange v (simplifyVersionRange r) = withinRange v r
    withinRange v r = withinRange v r'
==> simplifyVersionRange r = simplifyVersionRange r'
 || isNoVersion r
 || isNoVersion r'

isSpecificVersion :: VersionRange -> Maybe Version #

Is this version range in fact just a specific version?

For example the version range ">= 3 && <= 3" contains only the version 3.

isNoVersion :: VersionRange -> Bool #

This is the converse of isAnyVersion. It check if the version range is empty, if there is no possible version that satisfies the version range.

For example this is True (for all v):

isNoVersion (EarlierVersion v `IntersectVersionRanges` LaterVersion v)

isAnyVersion :: VersionRange -> Bool #

Does this VersionRange place any restriction on the Version or is it in fact equivalent to AnyVersion.

Note this is a semantic check, not simply a syntactic check. So for example the following is True (for all v).

isAnyVersion (EarlierVersion v `UnionVersionRanges` orLaterVersion v)

mkAbiHash :: String -> AbiHash #

Convert AbiHash to String

Since: 2.0.0.2

unAbiHash :: AbiHash -> String #

Construct a AbiHash from a String

mkAbiHash is the inverse to unAbiHash

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

Since: 2.0.0.2

data AbiHash #

ABI Hashes

Use mkAbiHash and unAbiHash to convert from/to a String.

This type is opaque since Cabal-2.0

Since: 2.0.0.2

Instances
Eq AbiHash 
Instance details

Methods

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

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

Read AbiHash 
Instance details
Show AbiHash 
Instance details
IsString AbiHash

mkAbiHash

Since: 2.0.0.2

Instance details

Methods

fromString :: String -> AbiHash #

Generic AbiHash 
Instance details

Associated Types

type Rep AbiHash :: * -> * #

Methods

from :: AbiHash -> Rep AbiHash x #

to :: Rep AbiHash x -> AbiHash #

Text AbiHash 
Instance details

Methods

disp :: AbiHash -> Doc #

parse :: ReadP r AbiHash #

Parsec AbiHash 
Instance details

Methods

parsec :: CabalParsing m => m AbiHash #

Pretty AbiHash 
Instance details

Methods

pretty :: AbiHash -> Doc #

Binary AbiHash 
Instance details

Methods

put :: AbiHash -> Put #

get :: Get AbiHash #

putList :: [AbiHash] -> Put #

NFData AbiHash 
Instance details

Methods

rnf :: AbiHash -> () #

type Rep AbiHash 
Instance details
type Rep AbiHash = D1 (MetaData "AbiHash" "Distribution.Types.AbiHash" "Cabal-2.2.0.0" True) (C1 (MetaCons "AbiHash" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ShortText)))

unComponentId :: ComponentId -> String #

Convert ComponentId to String

Since: 2.0.0.2

mkComponentId :: String -> ComponentId #

Construct a ComponentId from a String

mkComponentId is the inverse to unComponentId

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

Since: 2.0.0.2

data ComponentId #

A ComponentId uniquely identifies the transitive source code closure of a component (i.e. libraries, executables).

For non-Backpack components, this corresponds one to one with the UnitId, which serves as the basis for install paths, linker symbols, etc.

Use mkComponentId and unComponentId to convert from/to a String.

This type is opaque since Cabal-2.0

Since: 2.0.0.2

Instances
Eq ComponentId 
Instance details
Data ComponentId 
Instance details

Methods

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

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

toConstr :: ComponentId -> Constr #

dataTypeOf :: ComponentId -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord ComponentId 
Instance details
Read ComponentId 
Instance details
Show ComponentId 
Instance details
IsString ComponentId

mkComponentId

Since: 2.0.0.2

Instance details
Generic ComponentId 
Instance details

Associated Types

type Rep ComponentId :: * -> * #

Text ComponentId 
Instance details
Parsec ComponentId 
Instance details

Methods

parsec :: CabalParsing m => m ComponentId #

Pretty ComponentId 
Instance details

Methods

pretty :: ComponentId -> Doc #

Binary ComponentId 
Instance details
NFData ComponentId 
Instance details

Methods

rnf :: ComponentId -> () #

type Rep ComponentId 
Instance details
type Rep ComponentId = D1 (MetaData "ComponentId" "Distribution.Types.ComponentId" "Cabal-2.2.0.0" True) (C1 (MetaCons "ComponentId" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ShortText)))

mkPkgconfigName :: String -> PkgconfigName #

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

data PkgconfigName #

A pkg-config library name

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

Since: 2.0.0.2

Instances
Eq PkgconfigName 
Instance details
Data PkgconfigName 
Instance details

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 :: (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 #

Ord PkgconfigName 
Instance details
Read PkgconfigName 
Instance details
Show PkgconfigName 
Instance details
IsString PkgconfigName

mkPkgconfigName

Since: 2.0.0.2

Instance details
Generic PkgconfigName 
Instance details

Associated Types

type Rep PkgconfigName :: * -> * #

Text PkgconfigName 
Instance details
Parsec PkgconfigName 
Instance details
Pretty PkgconfigName 
Instance details

Methods

pretty :: PkgconfigName -> Doc #

Binary PkgconfigName 
Instance details
NFData PkgconfigName 
Instance details

Methods

rnf :: PkgconfigName -> () #

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

fromVersionIntervals :: VersionIntervals -> VersionRange #

Convert a VersionIntervals value back into a VersionRange expression representing the version intervals.

toVersionIntervals :: VersionRange -> VersionIntervals #

Convert a VersionRange to a sequence of version intervals.

withinIntervals :: Version -> VersionIntervals -> Bool #

Test if a version falls within the version intervals.

It exists mostly for completeness and testing. It satisfies the following properties:

withinIntervals v (toVersionIntervals vr) = withinRange v vr
withinIntervals v ivs = withinRange v (fromVersionIntervals ivs)

mkVersionIntervals :: [VersionInterval] -> VersionIntervals #

Directly construct a VersionIntervals from a list of intervals.

In Cabal-2.2 the Maybe is dropped from the result type.

versionIntervals :: VersionIntervals -> [VersionInterval] #

Inspect the list of version intervals.

asVersionIntervals :: VersionRange -> [VersionInterval] #

View a VersionRange as a union of intervals.

This provides a canonical view of the semantics of a VersionRange as opposed to the syntax of the expression used to define it. For the syntactic view use foldVersionRange.

Each interval is non-empty. The sequence is in increasing order and no intervals overlap or touch. Therefore only the first and last can be unbounded. The sequence can be empty if the range is empty (e.g. a range expression like && 2).

Other checks are trivial to implement using this view. For example:

isNoVersion vr | [] <- asVersionIntervals vr = True
               | otherwise                   = False
isSpecificVersion vr
   | [(LowerBound v  InclusiveBound
      ,UpperBound v' InclusiveBound)] <- asVersionIntervals vr
   , v == v'   = Just v
   | otherwise = Nothing

data VersionIntervals #

A complementary representation of a VersionRange. Instead of a boolean version predicate it uses an increasing sequence of non-overlapping, non-empty intervals.

The key point is that this representation gives a canonical representation for the semantics of VersionRanges. This makes it easier to check things like whether a version range is empty, covers all versions, or requires a certain minimum or maximum version. It also makes it easy to check equality or containment. It also makes it easier to identify 'simple' version predicates for translation into foreign packaging systems that do not support complex version range expressions.

data Bound #

Instances
Eq Bound 
Instance details

Methods

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

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

Show Bound 
Instance details

Methods

showsPrec :: Int -> Bound -> ShowS #

show :: Bound -> String #

showList :: [Bound] -> ShowS #

hasLowerBound :: VersionRange -> Bool #

Does the version range have an explicit lower bound?

Note: this function only considers the user-specified lower bounds, but not the implicit >=0 lower bound.

Since: 1.24.0.0

hasUpperBound :: VersionRange -> Bool #

Does the version range have an upper bound?

Since: 1.24.0.0

majorUpperBound :: Version -> Version #

Compute next greater major version to be used as upper bound

Example: 0.4.1 produces the version 0.5 which then can be used to construct a range >= 0.4.1 && < 0.5

Since: 2.2

withinRange :: Version -> VersionRange -> Bool #

Does this version fall within the given range?

This is the evaluation function for the VersionRange type.

normaliseVersionRange :: VersionRange -> VersionRange #

Normalise VersionRange.

In particular collapse (== v || > v) into >= v, and so on.

foldVersionRange #

Arguments

:: a

"-any" version

-> (Version -> a)
"== v"
-> (Version -> a)
"> v"
-> (Version -> a)
"< v"
-> (a -> a -> a)

"_ || _" union

-> (a -> a -> a)

"_ && _" intersection

-> VersionRange 
-> a 

Fold over the basic syntactic structure of a VersionRange.

This provides a syntactic view of the expression defining the version range. The syntactic sugar ">= v", "<= v" and "== v.*" is presented in terms of the other basic syntax.

For a semantic view use asVersionIntervals.

anaVersionRange :: (a -> VersionRangeF a) -> a -> VersionRange #

Unfold VersionRange.

Since: 2.2

cataVersionRange :: (VersionRangeF a -> a) -> VersionRange -> a #

Fold VersionRange.

Since: 2.2

majorBoundVersion :: Version -> VersionRange #

The version range ^>= v.

For example, for version 1.2.3.4, the version range ^>= 1.2.3.4 is the same as >= 1.2.3.4 && < 1.3.

Note that ^>= 1 is equivalent to >= 1 && < 1.1.

Since: 2.0.0.2

withinVersion :: Version -> VersionRange #

The version range == v.*.

For example, for version 1.2, the version range == 1.2.* is the same as >= 1.2 && < 1.3

withinRange v' (laterVersion v) = v' >= v && v' < upper v
  where
    upper (Version lower t) = Version (init lower ++ [last lower + 1]) t

intersectVersionRanges :: VersionRange -> VersionRange -> VersionRange #

The version range vr1 && vr2

  withinRange v' (intersectVersionRanges vr1 vr2)
= withinRange v' vr1 && withinRange v' vr2

unionVersionRanges :: VersionRange -> VersionRange -> VersionRange #

The version range vr1 || vr2

  withinRange v' (unionVersionRanges vr1 vr2)
= withinRange v' vr1 || withinRange v' vr2

orEarlierVersion :: Version -> VersionRange #

The version range <= v

withinRange v' (orEarlierVersion v) = v' <= v

earlierVersion :: Version -> VersionRange #

The version range < v

withinRange v' (earlierVersion v) = v' < v

orLaterVersion :: Version -> VersionRange #

The version range >= v

withinRange v' (orLaterVersion v) = v' >= v

laterVersion :: Version -> VersionRange #

The version range > v

withinRange v' (laterVersion v) = v' > v

notThisVersion :: Version -> VersionRange #

The version range || v

withinRange v' (notThisVersion v) = v' /= v

thisVersion :: Version -> VersionRange #

The version range == v

withinRange v' (thisVersion v) = v' == v

noVersion :: VersionRange #

The empty version range, that is a version range containing no versions.

This can be constructed using any unsatisfiable version range expression, for example > 1 && < 1.

withinRange v noVersion = False

anyVersion :: VersionRange #

The version range -any. That is, a version range containing all versions.

withinRange v anyVersion = True

data VersionRange #

Instances
Eq VersionRange 
Instance details
Data VersionRange 
Instance details

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 :: (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 #

Read VersionRange 
Instance details
Show VersionRange 
Instance details
Generic VersionRange 
Instance details

Associated Types

type Rep VersionRange :: * -> * #

Text VersionRange 
Instance details
Parsec VersionRange 
Instance details
Pretty VersionRange 
Instance details

Methods

pretty :: VersionRange -> Doc #

Binary VersionRange 
Instance details
NFData VersionRange 
Instance details

Methods

rnf :: VersionRange -> () #

type Rep VersionRange 
Instance details
type Rep VersionRange = D1 (MetaData "VersionRange" "Distribution.Types.VersionRange" "Cabal-2.2.0.0" False) (((C1 (MetaCons "AnyVersion" PrefixI False) (U1 :: * -> *) :+: 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 "WildcardVersion" 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)) :+: C1 (MetaCons "VersionRangeParens" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 VersionRange))))))

data VersionRangeF a #

F-Algebra of VersionRange. See cataVersionRange.

Since: 2.2

Instances
Functor VersionRangeF 
Instance details

Methods

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

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

Foldable VersionRangeF 
Instance details

Methods

fold :: Monoid m => VersionRangeF m -> 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

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) #

Eq a => Eq (VersionRangeF a) 
Instance details
Data a => Data (VersionRangeF a) 
Instance details

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 :: (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) #

Read a => Read (VersionRangeF a) 
Instance details
Show a => Show (VersionRangeF a) 
Instance details
Generic (VersionRangeF a) 
Instance details

Associated Types

type Rep (VersionRangeF a) :: * -> * #

type Rep (VersionRangeF a) 
Instance details
type Rep (VersionRangeF a) = D1 (MetaData "VersionRangeF" "Distribution.Types.VersionRange" "Cabal-2.2.0.0" False) (((C1 (MetaCons "AnyVersionF" PrefixI False) (U1 :: * -> *) :+: 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 "WildcardVersionF" 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)) :+: C1 (MetaCons "VersionRangeParensF" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))

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

Apply function to list of version number components

alterVersion f == mkVersion . f . versionNumbers

Since: 2.0.0.2

nullVersion :: Version #

Constant representing the special null Version

The nullVersion compares (via Ord) as less than every proper Version value.

Since: 2.0.0.2

versionNumbers :: Version -> [Int] #

Unpack Version into list of version number components.

This is the inverse to mkVersion, so the following holds:

(versionNumbers . mkVersion) vs == vs

Since: 2.0.0.2

mkVersion' :: Version -> Version #

Variant of Version which converts a Data.Version Version into Cabal's Version type.

Since: 2.0.0.2

version0 :: Version #

Version 0. A lower bound of Version.

Since: 2.2

mkVersion :: [Int] -> Version #

Construct Version from list of version number components.

For instance, mkVersion [3,2,1] constructs a Version representing the version 3.2.1.

All version components must be non-negative. mkVersion [] currently represents the special null version; see also nullVersion.

Since: 2.0.0.2

data Version #

A Version represents the version of a software entity.

Instances of Eq and Ord are provided, which gives exact equality and lexicographic ordering of the version number components (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.).

This type is opaque and distinct from the Version type in Data.Version since Cabal-2.0. The difference extends to the Binary instance using a different (and more compact) encoding.

Since: 2.0.0.2

Instances
Eq Version 
Instance details

Methods

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

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

Data Version 
Instance details

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 :: (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 #

Ord Version 
Instance details
Read Version 
Instance details
Show Version 
Instance details
Generic Version 
Instance details

Associated Types

type Rep Version :: * -> * #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Text Version 
Instance details

Methods

disp :: Version -> Doc #

parse :: ReadP r Version #

Parsec Version 
Instance details

Methods

parsec :: CabalParsing m => m Version #

Pretty Version 
Instance details

Methods

pretty :: Version -> Doc #

Binary Version 
Instance details

Methods

put :: Version -> Put #

get :: Get Version #

putList :: [Version] -> Put #

NFData Version 
Instance details

Methods

rnf :: Version -> () #

type Rep Version 
Instance details