Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
193 lines (127 sloc) 6.01 KB

Package Description Format Specification History

:ref:`pkg-desc` need to specify the version of the specification they need to be interpreted in via the :pkg-field:`cabal-version` declaration. The following list describes changes that occurred in each version of the cabal specification relative to the respective preceding published version.


The sequence of specification version numbers is not contiguous because it's synchronised with the version of the Cabal library. As a consequence, only even versions are considered proper published versions of the specification as odd versions of the Cabal library denote unreleased development branches which have no stability guarantee.

cabal-version: 3.0

  • Added the :pkg-field:`extra-dynamic-library-flavours` field to specify non-trivial variants of dynamic flavours. It is :pkg-field:`extra-library-flavours` but for shared libraries. Mainly useful for GHC's RTS library.

  • License fields use identifiers from SPDX License List version 3.3 2018-10-24

  • Remove deprecated hs-source-dir, :pkg-field:`extensions` and :pkg-field:`build-tools` fields.

  • Common stanzas are now allowed also in the beginnning of conditional sections. In other words, the following is valid

        import deps
        if flag(foo)
            import foo-deps
  • Allow redundant leading or trailing commas in package fields with optional commas, such as :pkg-field:`exposed-modules`

  • Require fields with optional commas to consistently omit or place commas between elements.

cabal-version: 2.4

  • Wildcard matching has been expanded. All previous wildcard expressions are still valid; some will match strictly more files than before. Specifically:
    • Double-star (**) wildcards are now accepted for recursive matching immediately before the final slash; they must be followed by a filename wildcard (e.g., foo/**/*.html is valid; foo/**/bar/*.html and foo/**/**/*.html, foo/**/bar.html are all invalid). As ** was an error in globs before, this does not affect any existing .cabal files that previously worked.
    • Wildcards now match when the pattern's extensions form a suffix of the candidate file's extension, rather than requiring strict equality (e.g., previously *.html did not match foo.en.html, but now it does).
  • License fields use identifiers from SPDX License List version 3.2 2018-07-10

cabal-version: 2.2

cabal-version: 2.0

cabal-version: 1.24

cabal-version: 1.22

cabal-version: 1.20

cabal-version: 1.18

cabal-version: 1.16

.. todo::

   this needs to be researched; there were only few changes between
   1.12 and 1.18;

cabal-version: 1.12