Distribution.Simple.Build

Cabal-3.2.1.0: A framework for packaging Haskell software

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

Distribution.Simple.Build

Description

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 ()
- showBuildInfo :: PackageDescription -> LocalBuildInfo -> BuildFlags -> IO String
- repl :: PackageDescription -> LocalBuildInfo -> ReplFlags -> [PPSuffixHandler] -> [String] -> IO ()
- startInterpreter :: Verbosity -> ProgramDb -> Compiler -> Platform -> PackageDBStack -> IO ()
- initialBuildSteps :: FilePath -> PackageDescription -> LocalBuildInfo -> Verbosity -> IO ()
- createInternalPackageDB :: Verbosity -> LocalBuildInfo -> FilePath -> IO PackageDB
- componentInitialBuildSteps :: FilePath -> PackageDescription -> LocalBuildInfo -> ComponentLocalBuildInfo -> Verbosity -> IO ()
- writeAutogenFiles :: Verbosity -> PackageDescription -> LocalBuildInfo -> ComponentLocalBuildInfo -> IO ()

# Documentation

build #

Arguments

:: 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.

showBuildInfo #

Arguments

:: PackageDescription | Mostly information from the .cabal file
-> LocalBuildInfo | Configuration information
-> BuildFlags | Flags that the user passed to build
-> IO String |

repl #

Arguments

:: 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 () #

Start an interpreter without loading any package files.

initialBuildSteps #

Arguments

:: FilePath | "dist" prefix
-> PackageDescription | mostly information from the .cabal file
-> LocalBuildInfo | Configuration information
-> Verbosity | The verbosity to use
-> IO () |

Runs `componentInitialBuildSteps` on every configured component.

createInternalPackageDB :: Verbosity -> LocalBuildInfo -> FilePath -> IO PackageDB #

Initialize a new package db file for libraries defined internally to the package.

componentInitialBuildSteps #

Arguments

:: FilePath | "dist" prefix
-> PackageDescription | mostly information from the .cabal file
-> LocalBuildInfo | Configuration information
-> ComponentLocalBuildInfo |
-> Verbosity | The verbosity to use
-> IO () |

Creates the autogenerated files for a particular configured component.

writeAutogenFiles :: Verbosity -> PackageDescription -> LocalBuildInfo -> ComponentLocalBuildInfo -> IO () #

Generate and write out the Paths_pkg.hs and cabal_macros.h files