Cabal-1.3.12: A framework for packaging Haskell softwareContentsIndex
Distribution.Simple.Compiler
Portabilityportable
Stabilityalpha
MaintainerIsaac Jones <ijones@syntaxpolice.org>
Contents
Haskell implementations
Support for package databases
Support for optimisation levels
Support for language extensions
Description
Haskell implementations.
Synopsis
module Distribution.Compiler
data Compiler = Compiler {
compilerId :: CompilerId
compilerExtensions :: [(Extension, String)]
}
showCompilerId :: Compiler -> String
compilerFlavor :: Compiler -> CompilerFlavor
compilerVersion :: Compiler -> Version
data PackageDB
= GlobalPackageDB
| UserPackageDB
| SpecificPackageDB FilePath
data OptimisationLevel
= NoOptimisation
| NormalOptimisation
| MaximumOptimisation
flagToOptimisationLevel :: Maybe String -> OptimisationLevel
type Flag = String
extensionsToFlags :: Compiler -> [Extension] -> [Flag]
unsupportedExtensions :: Compiler -> [Extension] -> [Extension]
Haskell implementations
module Distribution.Compiler
data Compiler
Constructors
Compiler
compilerId :: CompilerId
compilerExtensions :: [(Extension, String)]
show/hide Instances
showCompilerId :: Compiler -> String
compilerFlavor :: Compiler -> CompilerFlavor
compilerVersion :: Compiler -> Version
Support for package databases
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.
Constructors
GlobalPackageDB
UserPackageDB
SpecificPackageDB FilePath
show/hide Instances
Support for optimisation levels
data OptimisationLevel
Some compilers support optimising. Some have different levels. For compliers that do not the level is just capped to the level they do support.
Constructors
NoOptimisation
NormalOptimisation
MaximumOptimisation
show/hide Instances
flagToOptimisationLevel :: Maybe String -> OptimisationLevel
Support for language extensions
type Flag = String
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.
Produced by Haddock version 0.9