Jacques Carette
Jacques Carette

Reputation: 3135

Full definition of .cabal file syntax

I have googled extensively, and while I can find many examples of cabal files as well as good tutorials, I would like to have a proper grammar definition for the .cabal file format. Alas, I have not been able to find it. The more recent cabal documentation only mentions that its file format is backwards compatible -- with no links to the 'original' format with which it is compatible! Not useful.

Upvotes: 29

Views: 2664

Answers (3)

Marcelo Lazaroni
Marcelo Lazaroni

Reputation: 10237

The list of the fields, whether they are required or not, and what goes in them is here https://www.haskell.org/cabal/users-guide/developing-packages.html#package-properties.

Not the most obvious of places, I must admit.

Upvotes: 1

rem
rem

Reputation: 893

Is this what you want?

Distribution.PackageDiscription

Upvotes: 4

Don Stewart
Don Stewart

Reputation: 137957

a proper grammar definition for the .cabal file format.

The grammar is defined by its parser. I don't know of a formal specification.

Upvotes: 15

Related Questions