Cabal reference

 
project.cabal fields
Specifying the local packages
    packages Project packages.
    optional-packages Optional project packages.
    extra-packages Adds external pacakges as local
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 Prefered dependency versions.
    allow-newer Lift dependencies upper bound constaints.
    allow-older Lift dependency lower bound constaints.
    index-state (since version: 2.0) Use source package index state as it existed at a previous time.
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-objs Use GHC split objects feature.
    executable-stripping Strip installed programs.
    library-stripping (since version: 1.19) 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.21) Build relocatable package.
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.21) Enable profiling builds.
    profiling-detail (since version: 1.23) Profiling detail level.
    library-profiling-detail (since version: 1.23) Libraries profiling detail level.
    library-vanilla Build libraries without profiling.
    library-profiling (since version: 1.21) Build libraries with profiling enabled.
    executable-profiling (since version: 1.21) Build executables with profiling enabled.
Coverage options
    coverage (since version: 1.21) 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
    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.
    local-repo (deprecated)
    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.
    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 Prefered dependency versions.
    --allow-newer Lift dependencies upper bound constaints.
    --allow-older Lift dependency lower bound constaints.
Package configuration options
    --flags Enable or disable package flags.
    --with-compiler Path to compiler executable.
    --with-hc-pkg Specifies package tool.
    --disable-optimization Build with optimization.
    --enable-optimization Build with optimization.
    --configure-option Options to pass to configure script.
    --compiler Compiler to build with.
    --disable-tests Build tests.
    --enable-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-objs Use GHC split objects feature.
    --disable-split-objs Use GHC split objects feature.
    --enable-executable-stripping Strip installed programs.
    --disable-executable-stripping Strip installed programs.
    --disable-library-stripping (since version: 1.19) Strip installed libraries.
    --enable-library-stripping (since version: 1.19) 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.
    --disable-library-for-ghci Build libraries suitable for use with GHCi.
    --enable-library-for-ghci Build libraries suitable for use with GHCi.
    --relocatable (since version: 1.21) Build relocatable package.
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.21) Enable profiling builds.
    --disable-profiling (since version: 1.21) Enable profiling builds.
    --profiling-detail (since version: 1.23) Profiling detail level.
    --library-profiling-detail (since version: 1.23) Libraries profiling detail level.
    --enable-library-vanilla Build libraries without profiling.
    --disable-library-vanilla Build libraries without profiling.
    --disable-library-profiling (since version: 1.21) Build libraries with profiling enabled.
    --enable-library-profiling (since version: 1.21) Build libraries with profiling enabled.
    --enable-executable-profiling (since version: 1.21) Build executables with profiling enabled.
    --disable-executable-profiling (since version: 1.21) Build executables with profiling enabled.
Coverage options
    --enable-coverage (since version: 1.21) Build with coverage enabled.
    --disable-coverage (since version: 1.21) 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.
Advanced global configuration options
    --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.
    --local-repo (deprecated)
    --world-file (deprecated)
Advanced solver options
    --solver Which solver to use.
    --max-backjumps Maximum number of solver backjumps.
    --no-reorder-goals Allow solver to reorder goals.
    --reorder-goals Allow solver to reorder goals.
    --no-count-conflicts Solver prefers versions with less conflicts.
    --count-conflicts Solver prefers versions with less conflicts.
    --no-strong-flags Do not defer flag choices when solving.
    --strong-flags Do not defer flag choices when solving.
    --no-allow-boot-library-installs Allow cabal to install or upgrade any package.
    --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
    copyright
    author
    maintainer
    stability
    homepage
    bug-reports
    package-url
    synopsis
    description
    category
    tested-with
    data-files
    data-dir
    extra-source-files
    extra-doc-files
    extra-tmp-files
Library
    library Library build information.
    exposed-modules
    exposed
    reexported-modules
Executables
    executable Exectuable build info section.
    main-is
    scope
Test suites
    test Test suit build information.
    type
    main-is Module containing tests main function.
    test-module
Benchmarks
    benchmark (since version: 1.9.2) Benchmark build information.
    main-is
Foreign libraries
    type
    options
    mod-def-file
    lib-version-info
    lib-version-linux
Build information
    build-depends
    other-modules
    hs-source-dirs
    default-extensions
    other-extensions
    extensions (deprecated)
    build-tool-depends
    build-tools (deprecated)
    buildable
    ghc-options
    ghc-prof-options
    ghc-shared-options
    includes
    install-includes
    include-dirs
    c-sources
    js-sources
    extra-libraries
    extra-ghci-libraries
    extra-lib-dirs
    cc-options
    cpp-options
    ld-options
    pkgconfig-depends
    frameworks
    extra-frameworks-dirs
Configuration Flags
    flag Flag declaration.
    description
    default
    manual
Source Repositories
    source-repository
    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
    autogen-modules