Cabal reference

 
cabal.project fields
Specifying the local packages
    packages Project packages.
    optional-packages Optional project packages.
    extra-packages Adds external packages as local
Specifying Packages from Remote Version Control Locations
    type
    location
    tag
    subdir
    post-checkout-command
Global configuration options
    verbose Build verbosity level.
    jobs Number of builds running in parallel.
    keep-going Try to continue building on failure.
Solver configuration options
    constraints Extra dependencies constraints.
    preferences Preferred dependency versions.
    allow-newer Lift dependencies upper bound constraints.
    allow-older (since version: 2.0) Lift dependency lower bound constraints.
    index-state (since version: 2.0) Use source package index state as it existed at a previous time.
    active-repositories
    reject-unconstrained-dependencies Restrict the solver to packages that have constraints on them.
Package configuration options
    flags Enable or disable package flags.
    with-compiler Path to compiler executable.
    with-hc-pkg Specifies package tool.
    optimization Build with optimization.
    configure-options Options to pass to configure script.
    compiler Compiler to build with.
    tests Build tests.
    benchmarks Build benchmarks.
    extra-prog-path (since version: 1.18) Add directories to program search path.
    run-tests Run package test suite upon installation.
Object code options
    debug-info (since version: 1.22) Build with debug info enabled.
    split-sections (since version: 2.2) Use GHC's split sections feature.
    split-objs Use GHC's split objects feature.
    executable-stripping Strip installed programs.
    library-stripping (since version: 1.20) Strip installed libraries.
Executable options
    program-prefix Prepend prefix to program names.
    program-suffix Append refix to program names.
Dynamic linking options
    shared Build shared library.
    executable-dynamic Link executables dynamically.
    library-for-ghci Build libraries suitable for use with GHCi.
    relocatable (since version: 1.22) Build relocatable package.
Static linking options
    static Build static library.
    executable-static Build fully static executables.
Foreign function interface options
    extra-include-dirs Adds C header search path.
    extra-lib-dirs Adds library search directory.
    extra-framework-dirs Adds framework search directory (OS X only).
Profiling options
    profiling (since version: 1.22) Enable profiling builds.
    profiling-detail (since version: 1.24) Profiling detail level.
    library-profiling-detail (since version: 1.24) Libraries profiling detail level.
    library-vanilla Build libraries without profiling.
    library-profiling (since version: 1.22) Build libraries with profiling enabled.
    executable-profiling (since version: 1.22) Build executables with profiling enabled.
Coverage options
    coverage (since version: 1.22) Build with coverage enabled.
    library-coverage (deprecated)
Haddock options
    documentation Enable building of documentation.
    doc-index-file Path to haddock templates.
    haddock-hoogle Generate Hoogle file.
    haddock-html Build HTML documentation.
    haddock-html-location Haddock HTML templates location.
    haddock-executables Generate documentation for executables.
    haddock-tests Generate documentation for tests.
    haddock-benchmarks Generate documentation for benchmarks.
    haddock-all Generate documentation for everything
    haddock-internal Generate documentation for internal modules
    haddock-css Location of Haddoc CSS file.
    haddock-hyperlink-source Generate hyperlinked source code for documentation
    haddock-hscolour-css Location of CSS file for HsColour
    haddock-contents-location URL for contents page.
    haddock-keep-temp-files Keep temporary Haddock files.
Advanced global configuration options
    write-ghc-environment-files Whether a ``.ghc.environment`` should be created after a successful build.
    http-transport Transport to use with http(s) requests.
    ignore-expiry Ignore Hackage expiration dates.
    remote-repo-cache Location of packages cache.
    logs-dir Directory to store build logs.
    build-summary Build summaries location.
    world-file (deprecated)
Advanced solver options
    solver Which solver to use.
    max-backjumps Maximum number of solver backjumps.
    reorder-goals Allow solver to reorder goals.
    count-conflicts Solver prefers versions with less conflicts.
    fine-grained-conflicts Skip a version of a package if it does not resolve any conflicts encountered in the last version (solver optimization).
    minimize-conflict-set Try to improve the solver error message when there is no solution.
    strong-flags Do not defer flag choices when solving.
    allow-boot-library-installs Allow cabal to install or upgrade any package.
    cabal-lib-version Version of Cabal library used to build package.
 
cabal project flags
Global configuration options
    --verbose Build verbosity level.
    --jobs Number of builds running in parallel.
    --keep-going Try to continue building on failure.
Solver configuration options
    --constraint Extra dependencies constraints.
    --preference Preferred dependency versions.
    --allow-newer Lift dependencies upper bound constraints.
    --allow-older (since version: 2.0) Lift dependency lower bound constraints.
    --reject-unconstrained-dependencies Restrict the solver to packages that have constraints on them.
Package configuration options
    --flags Enable or disable package flags.
    --with-compiler Path to compiler executable.
    --with-hc-pkg Specifies package tool.
    --enable-optimization Build with optimization.
    --disable-optimization Build with optimization.
    --configure-option Options to pass to configure script.
    --compiler Compiler to build with.
    --enable-tests Build tests.
    --disable-tests Build tests.
    --enable-benchmarks Build benchmarks.
    --disable-benchmarks Build benchmarks.
    --extra-prog-path (since version: 1.18) Add directories to program search path.
    --run-tests Run package test suite upon installation.
Object code options
    --enable-debug-info (since version: 1.22) Build with debug info enabled.
    --disable-debug-info (since version: 1.22) Build with debug info enabled.
    --enable-split-sections (since version: 2.2) Use GHC's split sections feature.
    --disable-split-sections (since version: 2.2) Use GHC's split sections feature.
    --enable-split-objs Use GHC's split objects feature.
    --disable-split-objs Use GHC's split objects feature.
    --enable-executable-stripping Strip installed programs.
    --disable-executable-stripping Strip installed programs.
    --enable-library-stripping (since version: 1.20) Strip installed libraries.
    --disable-library-stripping (since version: 1.20) Strip installed libraries.
Executable options
    --program-prefix Prepend prefix to program names.
    --program-suffix Append refix to program names.
Dynamic linking options
    --enable-shared Build shared library.
    --disable-shared Build shared library.
    --enable-executable-dynamic Link executables dynamically.
    --disable-executable-dynamic Link executables dynamically.
    --enable-library-for-ghci Build libraries suitable for use with GHCi.
    --disable-library-for-ghci Build libraries suitable for use with GHCi.
    --relocatable (since version: 1.22) Build relocatable package.
Static linking options
    --enable-static Build static library.
    --disable-static Build static library.
    --enable-executable-static Build fully static executables.
    --disable-executable-static Build fully static executables.
Foreign function interface options
    --extra-include-dirs Adds C header search path.
    --extra-lib-dirs Adds library search directory.
    --extra-framework-dirs Adds framework search directory (OS X only).
Profiling options
    --enable-profiling (since version: 1.22) Enable profiling builds.
    --disable-profiling (since version: 1.22) Enable profiling builds.
    --profiling-detail (since version: 1.24) Profiling detail level.
    --library-profiling-detail (since version: 1.24) Libraries profiling detail level.
    --enable-library-vanilla Build libraries without profiling.
    --disable-library-vanilla Build libraries without profiling.
    --enable-library-profiling (since version: 1.22) Build libraries with profiling enabled.
    --disable-library-profiling (since version: 1.22) Build libraries with profiling enabled.
    --enable-executable-profiling (since version: 1.22) Build executables with profiling enabled.
    --disable-executable-profiling (since version: 1.22) Build executables with profiling enabled.
Coverage options
    --enable-coverage (since version: 1.22) Build with coverage enabled.
    --disable-coverage (since version: 1.22) Build with coverage enabled.
    --enable-library-coverage (deprecated)
    --disable-library-coverage (deprecated)
Haddock options
    --enable-documentation Enable building of documentation.
    --disable-documentation Enable building of documentation.
    --doc-index-file Path to haddock templates.
    --html-location Haddock HTML templates location.
Advanced global configuration options
    --write-ghc-environment-files Whether a ``.ghc.environment`` should be created after a successful build.
    --http-transport Transport to use with http(s) requests.
    --ignore-expiry Ignore Hackage expiration dates.
    --remote-repo-cache Location of packages cache.
    --logs-dir Directory to store build logs.
    --build-summary Build summaries location.
    --world-file (deprecated)
Advanced solver options
    --solver Which solver to use.
    --max-backjumps Maximum number of solver backjumps.
    --reorder-goals Allow solver to reorder goals.
    --no-reorder-goals Allow solver to reorder goals.
    --count-conflicts Solver prefers versions with less conflicts.
    --no-count-conflicts Solver prefers versions with less conflicts.
    --fine-grained-conflicts Skip a version of a package if it does not resolve any conflicts encountered in the last version (solver optimization).
    --no-fine-grained-conflicts Skip a version of a package if it does not resolve any conflicts encountered in the last version (solver optimization).
    --minimize-conflict-set Try to improve the solver error message when there is no solution.
    --no-minimize-conflict-set Try to improve the solver error message when there is no solution.
    --strong-flags Do not defer flag choices when solving.
    --no-strong-flags Do not defer flag choices when solving.
    --allow-boot-library-installs Allow cabal to install or upgrade any package.
    --no-allow-boot-library-installs Allow cabal to install or upgrade any package.
    --cabal-lib-version Version of Cabal library used to build package.
 
package.cabal fields
Package properties
    name
    version
    cabal-version
    build-type
    license
    license-file
    license-files (since version: 1.20)
    copyright
    author
    maintainer
    stability
    homepage
    bug-reports
    package-url
    synopsis
    description
    category
    tested-with
    data-files
    data-dir
    extra-source-files
    extra-doc-files (since version: 1.18)
    extra-tmp-files
Library
    library Library build information.
    exposed-modules
    virtual-modules (since version: 2.2)
    exposed
    visibility
    reexported-modules (since version: 1.22)
    signatures (since version: 2.0)
Executables
    executable Executable build info section.
    main-is
    scope (since version: 2.0)
Test suites
    test-suite Test suite build information.
    type
    main-is Module containing tests main function.
    test-module
Benchmarks
    benchmark (since version: 1.9.2) Benchmark build information.
    type
    main-is
Foreign libraries
    foreign-library (since version: 2.0) Foreign library build information.
    type
    options
    mod-def-file
    lib-version-info
    lib-version-linux
Build information
    build-depends
    other-modules
    hs-source-dir (removed in: 3.0; deprecated since: 2.0)
    hs-source-dirs
    default-extensions (since version: 1.12)
    other-extensions (since version: 1.12)
    default-language (since version: 1.12)
    other-languages (since version: 1.12)
    extensions (removed in: 3.0; deprecated since: 1.12)
    build-tool-depends (since version: 2.0)
    build-tools (removed in: 3.0; deprecated since: 2.0)
    buildable
    ghc-options
    ghc-prof-options
    ghc-shared-options
    ghcjs-options
    ghcjs-prof-options
    ghcjs-shared-options
    includes
    install-includes
    include-dirs
    c-sources
    cxx-sources (since version: 2.2)
    asm-sources (since version: 3.0)
    cmm-sources (since version: 3.0)
    js-sources
    extra-libraries
    extra-ghci-libraries
    extra-bundled-libraries (since version: 2.2)
    extra-lib-dirs
    extra-library-flavours
    extra-dynamic-library-flavours
    cc-options
    cpp-options
    cxx-options (since version: 2.2)
    cmm-options (since version: 3.0)
    asm-options (since version: 3.0)
    ld-options
    hsc2hs-options (since version: 3.6)
    pkgconfig-depends
    frameworks
    extra-framework-dirs (since version: 1.24)
    mixins (since version: 2.0)
Configuration Flags
    flag Flag declaration.
    description
    default
    manual
Common stanzas
    common (since version: 2.2) Common build info section
    import
Source Repositories
    source-repository (since version: 1.6)
    type
    location
    module
    branch
    tag
    subdir
Custom setup scripts
    custom-setup (since version: 1.24) Custom Setup.hs build information.
    setup-depends (since version: 1.24)
Autogenerated modules and includes
    autogen-modules (since version: 2.0)
    autogen-includes (since version: 3.0)
Virtual modules
    virtual-modules (since version: 2.2)