Cabal-1.2.4.0: A framework for packaging Haskell softwareSource codeContentsIndex
Distribution.Simple.Setup
Portabilityportable
Stabilityalpha
MaintainerIsaac Jones <ijones@syntaxpolice.org>
Description
Explanation: Data types and parser for the standard command-line setup. Will also return commands it doesn't know about.
Synopsis
module Distribution.Simple.Compiler
data Action
= ConfigCmd ConfigFlags
| BuildCmd
| CleanCmd
| CopyCmd CopyDest
| HscolourCmd
| HaddockCmd
| ProgramaticaCmd
| InstallCmd
| SDistCmd
| MakefileCmd
| TestCmd
| RegisterCmd
| UnregisterCmd
| HelpCmd
data ConfigFlags = ConfigFlags {
configPrograms :: ProgramConfiguration
configHcFlavor :: (Maybe CompilerFlavor)
configHcPath :: (Maybe FilePath)
configHcPkg :: (Maybe FilePath)
configVanillaLib :: Bool
configProfLib :: Bool
configSharedLib :: Bool
configProfExe :: Bool
configConfigureArgs :: [String]
configOptimization :: Bool
configPrefix :: (Maybe FilePath)
configBinDir :: (Maybe FilePath)
configLibDir :: (Maybe FilePath)
configLibSubDir :: (Maybe FilePath)
configLibExecDir :: (Maybe FilePath)
configDataDir :: (Maybe FilePath)
configDataSubDir :: (Maybe FilePath)
configDocDir :: (Maybe FilePath)
configHtmlDir :: (Maybe FilePath)
configInterfaceDir :: (Maybe FilePath)
configVerbose :: Verbosity
configPackageDB :: PackageDB
configGHCiLib :: Bool
configSplitObjs :: Bool
configConfigurationsFlags :: [(String, Bool)]
}
emptyConfigFlags :: ProgramConfiguration -> ConfigFlags
configureArgs :: ConfigFlags -> [String]
data CopyFlags = CopyFlags {
copyDest :: CopyDest
copyVerbose :: Verbosity
}
data CopyDest
= NoCopyDest
| CopyTo FilePath
| CopyPrefix FilePath
emptyCopyFlags :: CopyDest -> CopyFlags
data InstallFlags = InstallFlags {
installPackageDB :: (Maybe PackageDB)
installVerbose :: Verbosity
}
emptyInstallFlags :: InstallFlags
data HaddockFlags = HaddockFlags {
haddockHoogle :: Bool
haddockHtmlLocation :: (Maybe String)
haddockExecutables :: Bool
haddockCss :: (Maybe FilePath)
haddockHscolour :: Bool
haddockHscolourCss :: (Maybe FilePath)
haddockVerbose :: Verbosity
}
emptyHaddockFlags :: HaddockFlags
data HscolourFlags = HscolourFlags {
hscolourCSS :: (Maybe FilePath)
hscolourExecutables :: Bool
hscolourVerbose :: Verbosity
}
emptyHscolourFlags :: HscolourFlags
data BuildFlags = BuildFlags {
buildVerbose :: Verbosity
buildPrograms :: ProgramConfiguration
}
emptyBuildFlags :: ProgramConfiguration -> BuildFlags
data CleanFlags = CleanFlags {
cleanSaveConf :: Bool
cleanVerbose :: Verbosity
}
emptyCleanFlags :: CleanFlags
data PFEFlags = PFEFlags {
pfeVerbose :: Verbosity
}
data MakefileFlags = MakefileFlags {
makefileVerbose :: Verbosity
makefileFile :: (Maybe FilePath)
}
emptyMakefileFlags :: MakefileFlags
data RegisterFlags = RegisterFlags {
regPackageDB :: (Maybe PackageDB)
regGenScript :: Bool
regGenPkgConf :: Bool
regPkgConfFile :: (Maybe FilePath)
regInPlace :: Bool
regVerbose :: Verbosity
}
emptyRegisterFlags :: RegisterFlags
data SDistFlags = SDistFlags {
sDistSnapshot :: Bool
sDistVerbose :: Verbosity
}
parseGlobalArgs :: ProgramConfiguration -> [String] -> IO (Action, [String])
parseConfigureArgs :: ProgramConfiguration -> ConfigFlags -> [String] -> [OptDescr a] -> IO (ConfigFlags, [a], [String])
parseBuildArgs :: ProgramConfiguration -> BuildFlags -> [String] -> [OptDescr a] -> IO (BuildFlags, [a], [String])
parseCleanArgs :: CleanFlags -> [String] -> [OptDescr a] -> IO (CleanFlags, [a], [String])
parseMakefileArgs :: MakefileFlags -> [String] -> [OptDescr a] -> IO (MakefileFlags, [a], [String])
parseHscolourArgs :: HscolourFlags -> [String] -> [OptDescr a] -> IO (HscolourFlags, [a], [String])
parseHaddockArgs :: HaddockFlags -> [String] -> [OptDescr a] -> IO (HaddockFlags, [a], [String])
parseProgramaticaArgs :: [String] -> [OptDescr a] -> IO (PFEFlags, [a], [String])
parseTestArgs :: [String] -> [OptDescr a] -> IO (Verbosity, [a], [String])
parseInstallArgs :: InstallFlags -> [String] -> [OptDescr a] -> IO (InstallFlags, [a], [String])
parseSDistArgs :: [String] -> [OptDescr a] -> IO (SDistFlags, [a], [String])
parseRegisterArgs :: RegisterFlags -> [String] -> [OptDescr a] -> IO (RegisterFlags, [a], [String])
parseUnregisterArgs :: RegisterFlags -> [String] -> [OptDescr a] -> IO (RegisterFlags, [a], [String])
parseCopyArgs :: CopyFlags -> [String] -> [OptDescr a] -> IO (CopyFlags, [a], [String])
reqPathArg :: (FilePath -> a) -> ArgDescr a
reqDirArg :: (FilePath -> a) -> ArgDescr a
Documentation
module Distribution.Simple.Compiler
data Action Source
Constructors
ConfigCmd ConfigFlags
BuildCmd
CleanCmd
CopyCmd CopyDest
HscolourCmd
HaddockCmd
ProgramaticaCmd
InstallCmd
SDistCmd
MakefileCmd
TestCmd
RegisterCmd
UnregisterCmd
HelpCmd
show/hide Instances
data ConfigFlags Source
Flags to configure command
Constructors
ConfigFlags
configPrograms :: ProgramConfigurationAll programs that cabal may run
configHcFlavor :: (Maybe CompilerFlavor)The "flavor" of the compiler, sugh as GHC or Hugs.
configHcPath :: (Maybe FilePath)given compiler location
configHcPkg :: (Maybe FilePath)given hc-pkg location
configVanillaLib :: BoolEnable vanilla library
configProfLib :: BoolEnable profiling in the library
configSharedLib :: BoolBuild shared library
configProfExe :: BoolEnable profiling in the executables.
configConfigureArgs :: [String]Extra arguments to configure
configOptimization :: BoolEnable optimization.
configPrefix :: (Maybe FilePath)installation prefix
configBinDir :: (Maybe FilePath)installation dir for binaries,
configLibDir :: (Maybe FilePath)installation dir for object code libraries,
configLibSubDir :: (Maybe FilePath)subdirectory of libdir in which libs are installed
configLibExecDir :: (Maybe FilePath)installation dir for program executables,
configDataDir :: (Maybe FilePath)installation dir for read-only arch-independent data,
configDataSubDir :: (Maybe FilePath)subdirectory of datadir in which data files are installed
configDocDir :: (Maybe FilePath)installation dir for documentation
configHtmlDir :: (Maybe FilePath)installation dir for HTML documentation
configInterfaceDir :: (Maybe FilePath)installation dir for haddock interfaces
configVerbose :: Verbosityverbosity level
configPackageDB :: PackageDBthe --user flag?
configGHCiLib :: BoolEnable compiling library for GHCi
configSplitObjs :: BoolEnable -split-objs with GHC
configConfigurationsFlags :: [(String, Bool)]
show/hide Instances
emptyConfigFlags :: ProgramConfiguration -> ConfigFlagsSource
The default configuration of a package, before running configure, most things are "Nothing", zero, etc.
configureArgs :: ConfigFlags -> [String]Source
Arguments to pass to a configure script, e.g. generated by autoconf.
data CopyFlags Source
Flags to copy: (destdir, copy-prefix (backwards compat), verbosity)
Constructors
CopyFlags
copyDest :: CopyDest
copyVerbose :: Verbosity
show/hide Instances
data CopyDest Source
The location prefix for the copy command.
Constructors
NoCopyDest
CopyTo FilePath
CopyPrefix FilePath
show/hide Instances
emptyCopyFlags :: CopyDest -> CopyFlagsSource
data InstallFlags Source
Flags to install: (package db, verbosity)
Constructors
InstallFlags
installPackageDB :: (Maybe PackageDB)
installVerbose :: Verbosity
show/hide Instances
emptyInstallFlags :: InstallFlagsSource
data HaddockFlags Source
Constructors
HaddockFlags
haddockHoogle :: Bool
haddockHtmlLocation :: (Maybe String)
haddockExecutables :: Bool
haddockCss :: (Maybe FilePath)
haddockHscolour :: Bool
haddockHscolourCss :: (Maybe FilePath)
haddockVerbose :: Verbosity
show/hide Instances
emptyHaddockFlags :: HaddockFlagsSource
data HscolourFlags Source
Constructors
HscolourFlags
hscolourCSS :: (Maybe FilePath)
hscolourExecutables :: Bool
hscolourVerbose :: Verbosity
show/hide Instances
emptyHscolourFlags :: HscolourFlagsSource
data BuildFlags Source
Constructors
BuildFlags
buildVerbose :: Verbosity
buildPrograms :: ProgramConfiguration
show/hide Instances
emptyBuildFlags :: ProgramConfiguration -> BuildFlagsSource
data CleanFlags Source
Constructors
CleanFlags
cleanSaveConf :: Bool
cleanVerbose :: Verbosity
show/hide Instances
emptyCleanFlags :: CleanFlagsSource
data PFEFlags Source
Constructors
PFEFlags
pfeVerbose :: Verbosity
show/hide Instances
data MakefileFlags Source
Constructors
MakefileFlags
makefileVerbose :: Verbosity
makefileFile :: (Maybe FilePath)
show/hide Instances
emptyMakefileFlags :: MakefileFlagsSource
data RegisterFlags Source
Flags to register and unregister: (user package, gen-script, in-place, verbosity)
Constructors
RegisterFlags
regPackageDB :: (Maybe PackageDB)
regGenScript :: Bool
regGenPkgConf :: Bool
regPkgConfFile :: (Maybe FilePath)
regInPlace :: Bool
regVerbose :: Verbosity
show/hide Instances
emptyRegisterFlags :: RegisterFlagsSource
data SDistFlags Source
Flags to sdist: (snapshot, verbosity)
Constructors
SDistFlags
sDistSnapshot :: Bool
sDistVerbose :: Verbosity
show/hide Instances
parseGlobalArgs :: ProgramConfiguration -> [String] -> IO (Action, [String])Source
parseConfigureArgs :: ProgramConfiguration -> ConfigFlags -> [String] -> [OptDescr a] -> IO (ConfigFlags, [a], [String])Source
parseBuildArgs :: ProgramConfiguration -> BuildFlags -> [String] -> [OptDescr a] -> IO (BuildFlags, [a], [String])Source
parseCleanArgs :: CleanFlags -> [String] -> [OptDescr a] -> IO (CleanFlags, [a], [String])Source
parseMakefileArgs :: MakefileFlags -> [String] -> [OptDescr a] -> IO (MakefileFlags, [a], [String])Source
parseHscolourArgs :: HscolourFlags -> [String] -> [OptDescr a] -> IO (HscolourFlags, [a], [String])Source
parseHaddockArgs :: HaddockFlags -> [String] -> [OptDescr a] -> IO (HaddockFlags, [a], [String])Source
parseProgramaticaArgs :: [String] -> [OptDescr a] -> IO (PFEFlags, [a], [String])Source
parseTestArgs :: [String] -> [OptDescr a] -> IO (Verbosity, [a], [String])Source
parseInstallArgs :: InstallFlags -> [String] -> [OptDescr a] -> IO (InstallFlags, [a], [String])Source
parseSDistArgs :: [String] -> [OptDescr a] -> IO (SDistFlags, [a], [String])Source
parseRegisterArgs :: RegisterFlags -> [String] -> [OptDescr a] -> IO (RegisterFlags, [a], [String])Source
parseUnregisterArgs :: RegisterFlags -> [String] -> [OptDescr a] -> IO (RegisterFlags, [a], [String])Source
parseCopyArgs :: CopyFlags -> [String] -> [OptDescr a] -> IO (CopyFlags, [a], [String])Source
reqPathArg :: (FilePath -> a) -> ArgDescr aSource
reqDirArg :: (FilePath -> a) -> ArgDescr aSource
Produced by Haddock version 0.9