accelerate-llvm-native-1.2.0.1: 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: Cabal-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

Defined in Distribution.Simple.Compiler

Read Compiler 
Instance details

Defined in Distribution.Simple.Compiler

Show Compiler 
Instance details

Defined in Distribution.Simple.Compiler

Generic Compiler 
Instance details

Defined in Distribution.Simple.Compiler

Associated Types

type Rep Compiler :: Type -> Type #

Methods

from :: Compiler -> Rep Compiler x #

to :: Rep Compiler x -> Compiler #

Binary Compiler 
Instance details

Defined in Distribution.Simple.Compiler

Methods

put :: Compiler -> Put #

get :: Get Compiler #

putList :: [Compiler] -> Put #

type Rep Compiler 
Instance details

Defined in Distribution.Simple.Compiler

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

Defined in Distribution.Simple.Compiler

Ord PackageDB 
Instance details

Defined in Distribution.Simple.Compiler

Read PackageDB 
Instance details

Defined in Distribution.Simple.Compiler

Show PackageDB 
Instance details

Defined in Distribution.Simple.Compiler

Generic PackageDB 
Instance details

Defined in Distribution.Simple.Compiler

Associated Types

type Rep PackageDB :: Type -> Type #

Binary PackageDB 
Instance details

Defined in Distribution.Simple.Compiler

type Rep PackageDB 
Instance details

Defined in Distribution.Simple.Compiler

type Rep PackageDB = D1 (MetaData "PackageDB" "Distribution.Simple.Compiler" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" False) (C1 (MetaCons "GlobalPackageDB" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "UserPackageDB" PrefixI False) (U1 :: Type -> Type) :+: 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

Defined in Distribution.Simple.Compiler

Enum OptimisationLevel 
Instance details

Defined in Distribution.Simple.Compiler

Eq OptimisationLevel 
Instance details

Defined in Distribution.Simple.Compiler

Read OptimisationLevel 
Instance details

Defined in Distribution.Simple.Compiler

Show OptimisationLevel 
Instance details

Defined in Distribution.Simple.Compiler

Generic OptimisationLevel 
Instance details

Defined in Distribution.Simple.Compiler

Associated Types

type Rep OptimisationLevel :: Type -> Type #

Binary OptimisationLevel 
Instance details

Defined in Distribution.Simple.Compiler

type Rep OptimisationLevel 
Instance details

Defined in Distribution.Simple.Compiler

type Rep OptimisationLevel = D1 (MetaData "OptimisationLevel" "Distribution.Simple.Compiler" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" False) (C1 (MetaCons "NoOptimisation" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "NormalOptimisation" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "MaximumOptimisation" PrefixI False) (U1 :: Type -> Type)))

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

Defined in Distribution.Simple.Compiler

Enum DebugInfoLevel 
Instance details

Defined in Distribution.Simple.Compiler

Eq DebugInfoLevel 
Instance details

Defined in Distribution.Simple.Compiler

Read DebugInfoLevel 
Instance details

Defined in Distribution.Simple.Compiler

Show DebugInfoLevel 
Instance details

Defined in Distribution.Simple.Compiler

Generic DebugInfoLevel 
Instance details

Defined in Distribution.Simple.Compiler

Associated Types

type Rep DebugInfoLevel :: Type -> Type #

Binary DebugInfoLevel 
Instance details

Defined in Distribution.Simple.Compiler

type Rep DebugInfoLevel 
Instance details

Defined in Distribution.Simple.Compiler

type Rep DebugInfoLevel = D1 (MetaData "DebugInfoLevel" "Distribution.Simple.Compiler" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" False) ((C1 (MetaCons "NoDebugInfo" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "MinimalDebugInfo" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "NormalDebugInfo" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "MaximalDebugInfo" PrefixI False) (U1 :: Type -> Type)))

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

Defined in Distribution.Simple.Compiler

Read ProfDetailLevel 
Instance details

Defined in Distribution.Simple.Compiler

Show ProfDetailLevel 
Instance details

Defined in Distribution.Simple.Compiler

Generic ProfDetailLevel 
Instance details

Defined in Distribution.Simple.Compiler

Associated Types

type Rep ProfDetailLevel :: Type -> Type #

Binary ProfDetailLevel 
Instance details

Defined in Distribution.Simple.Compiler

type Rep ProfDetailLevel 
Instance details

Defined in Distribution.Simple.Compiler

type Rep ProfDetailLevel = D1 (MetaData "ProfDetailLevel" "Distribution.Simple.Compiler" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" False) ((C1 (MetaCons "ProfDetailNone" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "ProfDetailDefault" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ProfDetailExportedFunctions" PrefixI False) (U1 :: Type -> Type))) :+: (C1 (MetaCons "ProfDetailToplevelFunctions" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "ProfDetailAllFunctions" PrefixI False) (U1 :: Type -> Type) :+: 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.

Methods

packageId :: pkg -> PackageIdentifier #

class Package pkg => HasUnitId pkg where #

Packages that have an installed unit ID

Methods

installedUnitId :: pkg -> UnitId #

Instances
HasUnitId ReadyComponent 
Instance details

Defined in Distribution.Backpack.ReadyComponent

Methods

installedUnitId :: ReadyComponent -> UnitId #

HasUnitId InstalledPackageInfo 
Instance details

Defined in Distribution.Types.InstalledPackageInfo

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.

Methods

installedDepends :: pkg -> [UnitId] #

data Dependency #

Describes a dependency on a source package (API)

Instances
Eq Dependency 
Instance details

Defined in Distribution.Types.Dependency

Data Dependency 
Instance details

Defined in Distribution.Types.Dependency

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

Defined in Distribution.Types.Dependency

Show Dependency 
Instance details

Defined in Distribution.Types.Dependency

Generic Dependency 
Instance details

Defined in Distribution.Types.Dependency

Associated Types

type Rep Dependency :: Type -> Type #

Text Dependency 
Instance details

Defined in Distribution.Types.Dependency

Parsec Dependency 
Instance details

Defined in Distribution.Types.Dependency

Methods

parsec :: CabalParsing m => m Dependency #

Pretty Dependency 
Instance details

Defined in Distribution.Types.Dependency

Methods

pretty :: Dependency -> Doc #

NFData Dependency 
Instance details

Defined in Distribution.Types.Dependency

Methods

rnf :: Dependency -> () #

Binary Dependency 
Instance details

Defined in Distribution.Types.Dependency

type Rep Dependency 
Instance details

Defined in Distribution.Types.Dependency

type Rep Dependency = D1 (MetaData "Dependency" "Distribution.Types.Dependency" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" False) (C1 (MetaCons "Dependency" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PackageName) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 VersionRange)))

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

Defined in Distribution.Types.Module

Methods

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

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

Data Module 
Instance details

Defined in Distribution.Types.Module

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

Defined in Distribution.Types.Module

Read Module 
Instance details

Defined in Distribution.Types.Module

Show Module 
Instance details

Defined in Distribution.Types.Module

Generic Module 
Instance details

Defined in Distribution.Types.Module

Associated Types

type Rep Module :: Type -> Type #

Methods

from :: Module -> Rep Module x #

to :: Rep Module x -> Module #

Text Module 
Instance details

Defined in Distribution.Types.Module

Methods

disp :: Module -> Doc #

parse :: ReadP r Module #

Parsec Module 
Instance details

Defined in Distribution.Types.Module

Methods

parsec :: CabalParsing m => m Module #

Pretty Module 
Instance details

Defined in Distribution.Types.Module

Methods

pretty :: Module -> Doc #

NFData Module 
Instance details

Defined in Distribution.Types.Module

Methods

rnf :: Module -> () #

Binary Module 
Instance details

Defined in Distribution.Types.Module

Methods

put :: Module -> Put #

get :: Get Module #

putList :: [Module] -> Put #

type Rep Module 
Instance details

Defined in Distribution.Types.Module

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

Defined in Distribution.Types.UnitId

Methods

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

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

Data UnitId 
Instance details

Defined in Distribution.Types.UnitId

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

Defined in Distribution.Types.UnitId

Read UnitId 
Instance details

Defined in Distribution.Types.UnitId

Show UnitId 
Instance details

Defined in Distribution.Types.UnitId

IsString UnitId

mkUnitId

Since: Cabal-2.0.0.2

Instance details

Defined in Distribution.Types.UnitId

Methods

fromString :: String -> UnitId #

Generic UnitId 
Instance details

Defined in Distribution.Types.UnitId

Associated Types

type Rep UnitId :: Type -> Type #

Methods

from :: UnitId -> Rep UnitId x #

to :: Rep UnitId x -> UnitId #

Text UnitId 
Instance details

Defined in Distribution.Types.UnitId

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

Defined in Distribution.Types.UnitId

Methods

parsec :: CabalParsing m => m UnitId #

Pretty UnitId

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

Instance details

Defined in Distribution.Types.UnitId

Methods

pretty :: UnitId -> Doc #

NFData UnitId 
Instance details

Defined in Distribution.Types.UnitId

Methods

rnf :: UnitId -> () #

Binary UnitId 
Instance details

Defined in Distribution.Types.UnitId

Methods

put :: UnitId -> Put #

get :: Get UnitId #

putList :: [UnitId] -> Put #

type Rep UnitId 
Instance details

Defined in Distribution.Types.UnitId

type Rep UnitId = D1 (MetaData "UnitId" "Distribution.Types.UnitId" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" 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

Defined in Distribution.Types.UnitId

Data DefUnitId 
Instance details

Defined in Distribution.Types.UnitId

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

Defined in Distribution.Types.UnitId

Read DefUnitId 
Instance details

Defined in Distribution.Types.UnitId

Show DefUnitId 
Instance details

Defined in Distribution.Types.UnitId

Generic DefUnitId 
Instance details

Defined in Distribution.Types.UnitId

Associated Types

type Rep DefUnitId :: Type -> Type #

Text DefUnitId 
Instance details

Defined in Distribution.Types.UnitId

Parsec DefUnitId 
Instance details

Defined in Distribution.Types.UnitId

Methods

parsec :: CabalParsing m => m DefUnitId #

Pretty DefUnitId 
Instance details

Defined in Distribution.Types.UnitId

Methods

pretty :: DefUnitId -> Doc #

NFData DefUnitId 
Instance details

Defined in Distribution.Types.UnitId

Methods

rnf :: DefUnitId -> () #

Binary DefUnitId 
Instance details

Defined in Distribution.Types.UnitId

type Rep DefUnitId 
Instance details

Defined in Distribution.Types.UnitId

type Rep DefUnitId = D1 (MetaData "DefUnitId" "Distribution.Types.UnitId" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" 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

Defined in Distribution.Types.PackageId

Data PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Methods

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

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

toConstr :: PackageIdentifier -> Constr #

dataTypeOf :: PackageIdentifier -> DataType #

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

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

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

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

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

Defined in Distribution.Types.PackageId

Read PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Show PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Generic PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Associated Types

type Rep PackageIdentifier :: Type -> Type #

Package PackageIdentifier 
Instance details

Defined in Distribution.Package

Text PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Parsec PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Pretty PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

NFData PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Methods

rnf :: PackageIdentifier -> () #

Binary PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

type Rep PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

type Rep PackageIdentifier = D1 (MetaData "PackageIdentifier" "Distribution.Types.PackageId" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" 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: Cabal-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: Cabal-2.0.0.2

Instances
Eq PackageName 
Instance details

Defined in Distribution.Types.PackageName

Data PackageName 
Instance details

Defined in Distribution.Types.PackageName

Methods

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

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

toConstr :: PackageName -> Constr #

dataTypeOf :: PackageName -> DataType #

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

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

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

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

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

Defined in Distribution.Types.PackageName

Read PackageName 
Instance details

Defined in Distribution.Types.PackageName

Show PackageName 
Instance details

Defined in Distribution.Types.PackageName

IsString PackageName

mkPackageName

Since: Cabal-2.0.0.2

Instance details

Defined in Distribution.Types.PackageName

Generic PackageName 
Instance details

Defined in Distribution.Types.PackageName

Associated Types

type Rep PackageName :: Type -> Type #

Text PackageName 
Instance details

Defined in Distribution.Types.PackageName

Parsec PackageName 
Instance details

Defined in Distribution.Types.PackageName

Methods

parsec :: CabalParsing m => m PackageName #

Pretty PackageName 
Instance details

Defined in Distribution.Types.PackageName

Methods

pretty :: PackageName -> Doc #

NFData PackageName 
Instance details

Defined in Distribution.Types.PackageName

Methods

rnf :: PackageName -> () #

Binary PackageName 
Instance details

Defined in Distribution.Types.PackageName

type Rep PackageName 
Instance details

Defined in Distribution.Types.PackageName

type Rep PackageName = D1 (MetaData "PackageName" "Distribution.Types.PackageName" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" 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

Defined in Distribution.Compiler

Data CompilerFlavor 
Instance details

Defined in Distribution.Compiler

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

Defined in Distribution.Compiler

Read CompilerFlavor 
Instance details

Defined in Distribution.Compiler

Show CompilerFlavor 
Instance details

Defined in Distribution.Compiler

Generic CompilerFlavor 
Instance details

Defined in Distribution.Compiler

Associated Types

type Rep CompilerFlavor :: Type -> Type #

Text CompilerFlavor 
Instance details

Defined in Distribution.Compiler

Parsec CompilerFlavor 
Instance details

Defined in Distribution.Compiler

Pretty CompilerFlavor 
Instance details

Defined in Distribution.Compiler

Methods

pretty :: CompilerFlavor -> Doc #

NFData CompilerFlavor 
Instance details

Defined in Distribution.Compiler

Methods

rnf :: CompilerFlavor -> () #

Binary CompilerFlavor 
Instance details

Defined in Distribution.Compiler

type Rep CompilerFlavor 
Instance details

Defined in Distribution.Compiler

type Rep CompilerFlavor = D1 (MetaData "CompilerFlavor" "Distribution.Compiler" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" False) (((C1 (MetaCons "GHC" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "GHCJS" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "NHC" PrefixI False) (U1 :: Type -> Type))) :+: (C1 (MetaCons "YHC" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Hugs" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "HBC" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "Helium" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "JHC" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "LHC" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "UHC" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Eta" PrefixI False) (U1 :: Type -> Type)) :+: (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

Defined in Distribution.Compiler

Ord CompilerId 
Instance details

Defined in Distribution.Compiler

Read CompilerId 
Instance details

Defined in Distribution.Compiler

Show CompilerId 
Instance details

Defined in Distribution.Compiler

Generic CompilerId 
Instance details

Defined in Distribution.Compiler

Associated Types

type Rep CompilerId :: Type -> Type #

Text CompilerId 
Instance details

Defined in Distribution.Compiler

NFData CompilerId 
Instance details

Defined in Distribution.Compiler

Methods

rnf :: CompilerId -> () #

Binary CompilerId 
Instance details

Defined in Distribution.Compiler

type Rep CompilerId 
Instance details

Defined in Distribution.Compiler

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

Defined in Distribution.Compiler

Show CompilerInfo 
Instance details

Defined in Distribution.Compiler

Generic CompilerInfo 
Instance details

Defined in Distribution.Compiler

Associated Types

type Rep CompilerInfo :: Type -> Type #

Binary CompilerInfo 
Instance details

Defined in Distribution.Compiler

type Rep CompilerInfo 
Instance details

Defined in Distribution.Compiler

type Rep CompilerInfo = D1 (MetaData "CompilerInfo" "Distribution.Compiler" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" False) (C1 (MetaCons "CompilerInfo" PrefixI True) ((S1 (MetaSel (Just "compilerInfoId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CompilerId) :*: S1 (MetaSel (Just "compilerInfoAbiTag") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 AbiTag)) :*: (S1 (MetaSel (Just "compilerInfoCompat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [CompilerId])) :*: (S1 (MetaSel (Just "compilerInfoLanguages") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Language])) :*: S1 (MetaSel (Just "compilerInfoExtensions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Extension]))))))

data AbiTag #

Constructors

NoAbiTag 
AbiTag String 
Instances
Eq AbiTag 
Instance details

Defined in Distribution.Compiler

Methods

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

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

Read AbiTag 
Instance details

Defined in Distribution.Compiler

Show AbiTag 
Instance details

Defined in Distribution.Compiler

Generic AbiTag 
Instance details

Defined in Distribution.Compiler

Associated Types

type Rep AbiTag :: Type -> Type #

Methods

from :: AbiTag -> Rep AbiTag x #

to :: Rep AbiTag x -> AbiTag #

Text AbiTag 
Instance details

Defined in Distribution.Compiler

Methods

disp :: AbiTag -> Doc #

parse :: ReadP r AbiTag #

Binary AbiTag 
Instance details

Defined in Distribution.Compiler

Methods

put :: AbiTag -> Put #

get :: Get AbiTag #

putList :: [AbiTag] -> Put #

type Rep AbiTag 
Instance details

Defined in Distribution.Compiler

type Rep AbiTag = D1 (MetaData "AbiTag" "Distribution.Compiler" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" False) (C1 (MetaCons "NoAbiTag" PrefixI False) (U1 :: Type -> Type) :+: 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

Defined in Language.Haskell.Extension

Data Language 
Instance details

Defined in Language.Haskell.Extension

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

Defined in Language.Haskell.Extension

Show Language 
Instance details

Defined in Language.Haskell.Extension

Generic Language 
Instance details

Defined in Language.Haskell.Extension

Associated Types

type Rep Language :: Type -> Type #

Methods

from :: Language -> Rep Language x #

to :: Rep Language x -> Language #

Text Language 
Instance details

Defined in Language.Haskell.Extension

Methods

disp :: Language -> Doc #

parse :: ReadP r Language #

Parsec Language 
Instance details

Defined in Language.Haskell.Extension

Methods

parsec :: CabalParsing m => m Language #

Pretty Language 
Instance details

Defined in Language.Haskell.Extension

Methods

pretty :: Language -> Doc #

NFData Language 
Instance details

Defined in Language.Haskell.Extension

Methods

rnf :: Language -> () #

Binary Language 
Instance details

Defined in Language.Haskell.Extension

Methods

put :: Language -> Put #

get :: Get Language #

putList :: [Language] -> Put #

type Rep Language 
Instance details

Defined in Language.Haskell.Extension

type Rep Language = D1 (MetaData "Language" "Language.Haskell.Extension" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" False) (C1 (MetaCons "Haskell98" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Haskell2010" PrefixI False) (U1 :: Type -> Type) :+: 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

Defined in Language.Haskell.Extension

Data Extension 
Instance details

Defined in Language.Haskell.Extension

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

Defined in Language.Haskell.Extension

Read Extension 
Instance details

Defined in Language.Haskell.Extension

Show Extension 
Instance details

Defined in Language.Haskell.Extension

Generic Extension 
Instance details

Defined in Language.Haskell.Extension

Associated Types

type Rep Extension :: Type -> Type #

Text Extension 
Instance details

Defined in Language.Haskell.Extension

Parsec Extension 
Instance details

Defined in Language.Haskell.Extension

Methods

parsec :: CabalParsing m => m Extension #

Pretty Extension 
Instance details

Defined in Language.Haskell.Extension

Methods

pretty :: Extension -> Doc #

NFData Extension 
Instance details

Defined in Language.Haskell.Extension

Methods

rnf :: Extension -> () #

Binary Extension 
Instance details

Defined in Language.Haskell.Extension

type Rep Extension 
Instance details

Defined in Language.Haskell.Extension

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.

BlockArguments

Allow do blocks etc. in argument position.

NumericUnderscores

Allow use of underscores in numeric literals.

QuantifiedConstraints

Allow forall in constraints.

StarIsType

Have * refer to Type.

Instances
Bounded KnownExtension 
Instance details

Defined in Language.Haskell.Extension

Enum KnownExtension 
Instance details

Defined in Language.Haskell.Extension

Eq KnownExtension 
Instance details

Defined in Language.Haskell.Extension

Data KnownExtension 
Instance details

Defined in Language.Haskell.Extension

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

Defined in Language.Haskell.Extension

Read KnownExtension 
Instance details

Defined in Language.Haskell.Extension

Show KnownExtension 
Instance details

Defined in Language.Haskell.Extension

Generic KnownExtension 
Instance details

Defined in Language.Haskell.Extension

Associated Types

type Rep KnownExtension :: Type -> Type #

Text KnownExtension 
Instance details

Defined in Language.Haskell.Extension

Pretty KnownExtension 
Instance details

Defined in Language.Haskell.Extension

Methods

pretty :: KnownExtension -> Doc #

NFData KnownExtension 
Instance details

Defined in Language.Haskell.Extension

Methods

rnf :: KnownExtension -> () #

Binary KnownExtension 
Instance details

Defined in Language.Haskell.Extension

type Rep KnownExtension 
Instance details

Defined in Language.Haskell.Extension

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

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: Cabal-2.2.0.0

licenseToSPDX :: License -> License #

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

Since: Cabal-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

Defined in Distribution.License

Methods

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

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

Data License 
Instance details

Defined in Distribution.License

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

Defined in Distribution.License

Show License 
Instance details

Defined in Distribution.License

Generic License 
Instance details

Defined in Distribution.License

Associated Types

type Rep License :: Type -> Type #

Methods

from :: License -> Rep License x #

to :: Rep License x -> License #

Text License 
Instance details

Defined in Distribution.License

Methods

disp :: License -> Doc #

parse :: ReadP r License #

Parsec License 
Instance details

Defined in Distribution.License

Methods

parsec :: CabalParsing m => m License #

Pretty License 
Instance details

Defined in Distribution.License

Methods

pretty :: License -> Doc #

NFData License 
Instance details

Defined in Distribution.License

Methods

rnf :: License -> () #

Binary License 
Instance details

Defined in Distribution.License

Methods

put :: License -> Put #

get :: Get License #

putList :: [License] -> Put #

type Rep License 
Instance details

Defined in Distribution.License

type Rep License = D1 (MetaData "License" "Distribution.License" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" 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 :: Type -> Type) :+: C1 (MetaCons "BSD3" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "BSD4" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "MIT" PrefixI False) (U1 :: Type -> Type)))) :+: (((C1 (MetaCons "ISC" PrefixI False) (U1 :: Type -> Type) :+: 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 :: Type -> Type))) :+: ((C1 (MetaCons "AllRightsReserved" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "UnspecifiedLicense" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "OtherLicense" PrefixI False) (U1 :: Type -> Type) :+: 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: Cabal-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: Cabal-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: Cabal-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: Cabal-2.0.0.2

Instances
Eq AbiHash 
Instance details

Defined in Distribution.Types.AbiHash

Methods

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

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

Read AbiHash 
Instance details

Defined in Distribution.Types.AbiHash

Show AbiHash 
Instance details

Defined in Distribution.Types.AbiHash

IsString AbiHash

mkAbiHash

Since: Cabal-2.0.0.2

Instance details

Defined in Distribution.Types.AbiHash

Methods

fromString :: String -> AbiHash #

Generic AbiHash 
Instance details

Defined in Distribution.Types.AbiHash

Associated Types

type Rep AbiHash :: Type -> Type #

Methods

from :: AbiHash -> Rep AbiHash x #

to :: Rep AbiHash x -> AbiHash #

Text AbiHash 
Instance details

Defined in Distribution.Types.AbiHash

Methods

disp :: AbiHash -> Doc #

parse :: ReadP r AbiHash #

Parsec AbiHash 
Instance details

Defined in Distribution.Types.AbiHash

Methods

parsec :: CabalParsing m => m AbiHash #

Pretty AbiHash 
Instance details

Defined in Distribution.Types.AbiHash

Methods

pretty :: AbiHash -> Doc #

NFData AbiHash 
Instance details

Defined in Distribution.Types.AbiHash

Methods

rnf :: AbiHash -> () #

Binary AbiHash 
Instance details

Defined in Distribution.Types.AbiHash

Methods

put :: AbiHash -> Put #

get :: Get AbiHash #

putList :: [AbiHash] -> Put #

type Rep AbiHash 
Instance details

Defined in Distribution.Types.AbiHash

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

unComponentId :: ComponentId -> String #

Convert ComponentId to String

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

Instances
Eq ComponentId 
Instance details

Defined in Distribution.Types.ComponentId

Data ComponentId 
Instance details

Defined in Distribution.Types.ComponentId

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

Defined in Distribution.Types.ComponentId

Read ComponentId 
Instance details

Defined in Distribution.Types.ComponentId

Show ComponentId 
Instance details

Defined in Distribution.Types.ComponentId

IsString ComponentId

mkComponentId

Since: Cabal-2.0.0.2

Instance details

Defined in Distribution.Types.ComponentId

Generic ComponentId 
Instance details

Defined in Distribution.Types.ComponentId

Associated Types

type Rep ComponentId :: Type -> Type #

Text ComponentId 
Instance details

Defined in Distribution.Types.ComponentId

Parsec ComponentId 
Instance details

Defined in Distribution.Types.ComponentId

Methods

parsec :: CabalParsing m => m ComponentId #

Pretty ComponentId 
Instance details

Defined in Distribution.Types.ComponentId

Methods

pretty :: ComponentId -> Doc #

NFData ComponentId 
Instance details

Defined in Distribution.Types.ComponentId

Methods

rnf :: ComponentId -> () #

Binary ComponentId 
Instance details

Defined in Distribution.Types.ComponentId

type Rep ComponentId 
Instance details

Defined in Distribution.Types.ComponentId

type Rep ComponentId = D1 (MetaData "ComponentId" "Distribution.Types.ComponentId" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" 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: Cabal-2.0.0.2

unPkgconfigName :: PkgconfigName -> String #

Convert PkgconfigName to String

Since: Cabal-2.0.0.2

data PkgconfigName #

A pkg-config library name

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

Since: Cabal-2.0.0.2

Instances
Eq PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Data PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Methods

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

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

toConstr :: PkgconfigName -> Constr #

dataTypeOf :: PkgconfigName -> DataType #

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

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

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

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

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

Defined in Distribution.Types.PkgconfigName

Read PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Show PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

IsString PkgconfigName

mkPkgconfigName

Since: Cabal-2.0.0.2

Instance details

Defined in Distribution.Types.PkgconfigName

Generic PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Associated Types

type Rep PkgconfigName :: Type -> Type #

Text PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Parsec PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Pretty PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Methods

pretty :: PkgconfigName -> Doc #

NFData PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

Methods

rnf :: PkgconfigName -> () #

Binary PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

type Rep PkgconfigName 
Instance details

Defined in Distribution.Types.PkgconfigName

type Rep PkgconfigName = D1 (MetaData "PkgconfigName" "Distribution.Types.PkgconfigName" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" 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

Defined in Distribution.Types.VersionInterval

Methods

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

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

Show Bound 
Instance details

Defined in Distribution.Types.VersionInterval

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: Cabal-1.24.0.0

hasUpperBound :: VersionRange -> Bool #

Does the version range have an upper bound?

Since: Cabal-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: Cabal-2.2

wildcardUpperBound :: Version -> Version #

Since: Cabal-2.2

withinRange :: Version -> VersionRange -> Bool #

Does this version fall within the given range?

This is the evaluation function for the VersionRange type.

stripParensVersionRange :: VersionRange -> VersionRange #

Remove VersionRangeParens constructors.

Since: Cabal-2.2

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: Cabal-2.2

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

Fold VersionRange.

Since: Cabal-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: Cabal-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

Defined in Distribution.Types.VersionRange

Data VersionRange 
Instance details

Defined in Distribution.Types.VersionRange

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

Defined in Distribution.Types.VersionRange

Show VersionRange 
Instance details

Defined in Distribution.Types.VersionRange

Generic VersionRange 
Instance details

Defined in Distribution.Types.VersionRange

Associated Types

type Rep VersionRange :: Type -> Type #

Text VersionRange 
Instance details

Defined in Distribution.Types.VersionRange

Parsec VersionRange 
Instance details

Defined in Distribution.Types.VersionRange

Pretty VersionRange 
Instance details

Defined in Distribution.Types.VersionRange

Methods

pretty :: VersionRange -> Doc #

NFData VersionRange 
Instance details

Defined in Distribution.Types.VersionRange

Methods

rnf :: VersionRange -> () #

Binary VersionRange 
Instance details

Defined in Distribution.Types.VersionRange

type Rep VersionRange 
Instance details

Defined in Distribution.Types.VersionRange

type Rep VersionRange = D1 (MetaData "VersionRange" "Distribution.Types.VersionRange" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" False) (((C1 (MetaCons "AnyVersion" PrefixI False) (U1 :: Type -> Type) :+: 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: Cabal-2.2

Instances
Functor VersionRangeF 
Instance details

Defined in Distribution.Types.VersionRange

Methods

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

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

Foldable VersionRangeF 
Instance details

Defined in Distribution.Types.VersionRange

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

Defined in Distribution.Types.VersionRange

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

Defined in Distribution.Types.VersionRange

Data a => Data (VersionRangeF a) 
Instance details

Defined in Distribution.Types.VersionRange

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

Defined in Distribution.Types.VersionRange

Show a => Show (VersionRangeF a) 
Instance details

Defined in Distribution.Types.VersionRange

Generic (VersionRangeF a) 
Instance details

Defined in Distribution.Types.VersionRange

Associated Types

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

type Rep (VersionRangeF a) 
Instance details

Defined in Distribution.Types.VersionRange

type Rep (VersionRangeF a) = D1 (MetaData "VersionRangeF" "Distribution.Types.VersionRange" "Cabal-2.4.1.0-9MZFDeNrcJI10bcroa6pq8" False) (((C1 (MetaCons "AnyVersionF" PrefixI False) (U1 :: Type -> Type) :+: 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: Cabal-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: Cabal-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: Cabal-2.0.0.2

mkVersion' :: Version -> Version #

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

Since: Cabal-2.0.0.2

version0 :: Version #

Version 0. A lower bound of Version.

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

Instances
Eq Version 
Instance details

Defined in Distribution.Types.Version

Methods

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

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

Data Version 
Instance details

Defined in Distribution.Types.Version

Methods

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

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

toConstr :: Version -> Constr #

dataTypeOf :: Version -> DataType #

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

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

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

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

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

Defined in Distribution.Types.Version

Read Version 
Instance details

Defined in Distribution.Types.Version

Show Version 
Instance details

Defined in Distribution.Types.Version

Generic Version 
Instance details

Defined in Distribution.Types.Version

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Text Version 
Instance details

Defined in Distribution.Types.Version

Methods

disp :: Version -> Doc #

parse :: ReadP r Version #

Parsec Version 
Instance details

Defined in Distribution.Types.Version

Methods

parsec :: CabalParsing m => m Version #

Pretty Version 
Instance details

Defined in Distribution.Types.Version

Methods

pretty :: Version -> Doc #

NFData Version 
Instance details

Defined in Distribution.Types.Version

Methods

rnf :: Version -> () #

Binary Version 
Instance details

Defined in Distribution.Types.Version

Methods

put :: Version -> Put #

get :: Get Version #

putList :: [Version] -> Put #

type Rep Version 
Instance details

Defined in Distribution.Types.Version