Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.05 KB

README.md

File metadata and controls

31 lines (20 loc) · 1.05 KB

stylish-cabal stylish-cabal stylish-cabal

Automatic formatting for Cabal files.

Examples

example.cabal and example-out.cabal demonstrate what stylish-cabal does.

Usage

# prints a highlighted and formatted version of myproject.cabal to stdout.
$ stylish-cabal myproject.cabal

# reformats myproject.cabal in-place.
$ stylish-cabal -i myproject.cabal

# pipe usage
$ cat myproject.cabal | stylish-cabal > myproject-formatted.cabal

Note that:

  • stylish-cabal cannot preserve comments or unrecognized declarations.

  • stylish-cabal cannot parse and will not produce a .cabal file using pre-1.2 flat (non-section) Cabal syntax.

  • stylish-cabal will not attempt to format a Cabal file if warnings are emitted during parsing. Fix warnings before using it.