cabal-fmt
cabal-fmt copied to clipboard
`ghc-options` should be listed one-per-line
Currently, ghc-options
are listed as a wrapped text blob. For example, take this excerpt:
common lang
build-depends: base >=4.12 && <4.15
default-language: Haskell2010
default-extensions:
BangPatterns
BinaryLiterals
-- ...
ghc-options:
-Wall -Wincomplete-uni-patterns -Wcompat
-Wincomplete-record-updates -Wmissing-home-modules
-Wmissing-export-lists -Wmissing-import-lists
-Wredundant-constraints
I like that cabal-fmt
puts each language extension in default-extensions
on a separate line, since this minimizes diffs when we change the extension list. I wish cabal-fmt
also put each option in ghc-options
on a separate line to likewise minimize diffs:
ghc-options:
-Wall
-Wincomplete-uni-patterns
-Wcompat
-Wincomplete-record-updates
-Wmissing-home-modules
-Wmissing-export-lists
-Wmissing-import-lists
-Wredundant-constraints
This should be configurable. I don't like one flag per line, but if someone wants to put the work in, be my guest.