See cabal-prettify.cabal
for an example.
-
Prettify the configuration file of the package you are in right now:
cabal-prettify --this
-
Prettify specified configuration files:
cabal-prettify cabal-prettify.cabal examples/**/*.cabal
-
Prettify standard input:
cabal-prettify --filter < cabal-prettify.cabal
-
Tidy up the directory structure:
cabal-prettify --this --move
-
Check but do not modify, exit successfully if everything is already well formatted:
cabal-prettify --this --check
-
Automatically add all Haskell files to
exposed-modules
orother-modules
:cabal-prettify --this --expose
-
Prettified files are backed up with the extension
*.backup
.-
Files that are already pretty are not backed up.
This ensures that running
cabal-prettify
twice in a row does not overwrite the original.
-