Copyright | Isaac Jones 2003-2005 Ross Paterson 2006 Duncan Coutts 2007-2008 2012 |
---|---|
License | BSD3 |
Maintainer | cabal-devel@haskell.org |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This is the entry point to actually building the modules in a package. It doesn't actually do much itself, most of the work is delegated to compiler-specific actions. It does do some non-compiler specific bits like running pre-processors.
Synopsis
- build :: PackageDescription -> LocalBuildInfo -> BuildFlags -> [PPSuffixHandler] -> IO ()
- repl :: PackageDescription -> LocalBuildInfo -> ReplFlags -> [PPSuffixHandler] -> [String] -> IO ()
- startInterpreter :: Verbosity -> ProgramDb -> Compiler -> Platform -> PackageDBStack -> IO ()
- preBuildComponent :: Verbosity -> LocalBuildInfo -> TargetInfo -> IO ()
- data AutogenFile
- type AutogenFileContents = ByteString
- writeBuiltinAutogenFiles :: Verbosity -> PackageDescription -> LocalBuildInfo -> ComponentLocalBuildInfo -> IO ()
- writeAutogenFiles :: Verbosity -> LocalBuildInfo -> ComponentLocalBuildInfo -> Map AutogenFile AutogenFileContents -> IO ()
- createInternalPackageDB :: Verbosity -> LocalBuildInfo -> FilePath -> IO PackageDB
Build
:: PackageDescription | Mostly information from the .cabal file |
-> LocalBuildInfo | Configuration information |
-> BuildFlags | Flags that the user passed to build |
-> [PPSuffixHandler] | preprocessors to run before compiling |
-> IO () |
Build the libraries and executables in this package.
Repl
:: PackageDescription | Mostly information from the .cabal file |
-> LocalBuildInfo | Configuration information |
-> ReplFlags | Flags that the user passed to build |
-> [PPSuffixHandler] | preprocessors to run before compiling |
-> [String] | |
-> IO () |
startInterpreter :: Verbosity -> ProgramDb -> Compiler -> Platform -> PackageDBStack -> IO () Source #
Start an interpreter without loading any package files.
Build preparation
:: Verbosity | |
-> LocalBuildInfo | Configuration information |
-> TargetInfo | |
-> IO () |
Pre-build steps for a component: creates the autogenerated files for a particular configured component.
data AutogenFile Source #
Instances
Show AutogenFile Source # | |
Defined in Distribution.Simple.Build showsPrec :: Int -> AutogenFile -> ShowS # show :: AutogenFile -> String # showList :: [AutogenFile] -> ShowS # | |
Eq AutogenFile Source # | |
Defined in Distribution.Simple.Build (==) :: AutogenFile -> AutogenFile -> Bool # (/=) :: AutogenFile -> AutogenFile -> Bool # | |
Ord AutogenFile Source # | |
Defined in Distribution.Simple.Build compare :: AutogenFile -> AutogenFile -> Ordering # (<) :: AutogenFile -> AutogenFile -> Bool # (<=) :: AutogenFile -> AutogenFile -> Bool # (>) :: AutogenFile -> AutogenFile -> Bool # (>=) :: AutogenFile -> AutogenFile -> Bool # max :: AutogenFile -> AutogenFile -> AutogenFile # min :: AutogenFile -> AutogenFile -> AutogenFile # |
type AutogenFileContents = ByteString Source #
A representation of the contents of an autogenerated file.
writeBuiltinAutogenFiles :: Verbosity -> PackageDescription -> LocalBuildInfo -> ComponentLocalBuildInfo -> IO () Source #
Generate and write to disk all built-in autogenerated files
for the specified component. These files will be put in the
autogenerated module directory for this component
(see autogenComponentsModuleDir
).
This includes:
writeAutogenFiles :: Verbosity -> LocalBuildInfo -> ComponentLocalBuildInfo -> Map AutogenFile AutogenFileContents -> IO () Source #
Write the given autogenerated files in the autogenerated modules directory for the component.
Internal package database creation
createInternalPackageDB :: Verbosity -> LocalBuildInfo -> FilePath -> IO PackageDB Source #
Initialize a new package db file for libraries defined internally to the package.