Copyright | (c) David Himmelstrup 2005 Duncan Coutts 2005 |
---|---|
License | BSD-like |
Maintainer | cabal-devel@haskell.org |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
High level interface to configuring a package.
Synopsis
- configure :: Verbosity -> PackageDBStack -> RepoContext -> Compiler -> Platform -> ProgramDb -> ConfigFlags -> ConfigExFlags -> [String] -> IO ()
- configureSetupScript :: PackageDBStack -> Compiler -> Platform -> ProgramDb -> FilePath -> VersionRange -> Maybe Lock -> Bool -> InstalledPackageIndex -> Maybe ReadyPackage -> SetupScriptOptions
- chooseCabalVersion :: ConfigExFlags -> Maybe Version -> VersionRange
- checkConfigExFlags :: Package pkg => Verbosity -> InstalledPackageIndex -> PackageIndex pkg -> ConfigExFlags -> IO ()
- readConfigFlagsFrom :: FilePath -> IO (ConfigFlags, ConfigExFlags)
- readConfigFlags :: FilePath -> IO (ConfigFlags, ConfigExFlags)
- cabalConfigFlagsFile :: FilePath -> FilePath
- writeConfigFlagsTo :: FilePath -> Verbosity -> (ConfigFlags, ConfigExFlags) -> IO ()
- writeConfigFlags :: Verbosity -> FilePath -> (ConfigFlags, ConfigExFlags) -> IO ()
Documentation
configure :: Verbosity -> PackageDBStack -> RepoContext -> Compiler -> Platform -> ProgramDb -> ConfigFlags -> ConfigExFlags -> [String] -> IO () Source #
Configure the package found in the local directory
configureSetupScript :: PackageDBStack -> Compiler -> Platform -> ProgramDb -> FilePath -> VersionRange -> Maybe Lock -> Bool -> InstalledPackageIndex -> Maybe ReadyPackage -> SetupScriptOptions Source #
chooseCabalVersion :: ConfigExFlags -> Maybe Version -> VersionRange Source #
Choose the Cabal version such that the setup scripts compiled against this
version will support the given command-line flags. Currently, it implements no
specific restrictions and allows any version, unless the second argument is
filled with a Version
, in which case this version is picked.
checkConfigExFlags :: Package pkg => Verbosity -> InstalledPackageIndex -> PackageIndex pkg -> ConfigExFlags -> IO () Source #
Warn if any constraints or preferences name packages that are not in the source package index or installed package index.
Saved configure flags
:: FilePath | path to saved flags file |
-> IO (ConfigFlags, ConfigExFlags) |
Read saved configure flags and restore the saved environment from the specified files.
:: FilePath | --build-dir |
-> IO (ConfigFlags, ConfigExFlags) |
Read saved configure flags and restore the saved environment from the usual location.
cabalConfigFlagsFile :: FilePath -> FilePath Source #
The path (relative to --build-dir
) where the arguments to configure
should be saved.
:: FilePath | path to saved flags file |
-> Verbosity | |
-> (ConfigFlags, ConfigExFlags) | |
-> IO () |
Save the configure flags and environment to the specified files.
:: Verbosity | |
-> FilePath | --build-dir |
-> (ConfigFlags, ConfigExFlags) | |
-> IO () |
Save the build flags to the usual location.