A library for working with .cabal files

Version on this page:
LTS Haskell 22.22:
Stackage Nightly 2024-05-16:
Latest on Hackage:

See all snapshots Cabal-syntax appears in

BSD-3-Clause licensed by Cabal Development Team
Maintained by [email protected]
This version can be pinned in stack with:Cabal-syntax-,1567

Module documentation for

There are no documented modules for this package.

Depends on 1 package(full list with versions):
Used by 1 package in lts-18.28(full list with versions):

This library provides tools for reading and manipulating the .cabal file format.

Version 3.6 (unlike the following versions) is a dummy package that prevents module name clases between Cabal and Cabal-syntax if used together with a Cabal flag as described below.

In Cabal-3.7 this package was split off. To avoid module name clashes, you can add this to your .cabal file:

flag Cabal-syntax
  description: Use the new Cabal-syntax package
  default: False
  manual: False

  -- ...
  if flag(Cabal-syntax)
    build-depends: Cabal-syntax >= 3.7
    build-depends: Cabal < 3.7, Cabal-syntax < 3.7

This will default to the older build, but will allow consumers to opt-in to the newer libraries by requiring Cabal or Cabal-syntax >= 3.7