
Yes. I also prefer the latter, it's more diff friendly and has more consistent indentation. We should pick and indentation amount (2 or 4) and stick with it. I vote for 2, just because that's what I use. :) If we could encode a style guide in a formatter, it would be much easier for us to do automatic rewriting of Cabal files, which is needed for features like `cabal freeze` P.S. I think Duncan wants to do this as well, but he got stuck on some Parsec dependency like issue IIRC. On Wed, Feb 26, 2014 at 2:48 PM, Carter Schonwald < carter.schonwald@gmail.com> wrote:
I don't see why not.
On Wednesday, February 26, 2014, Daniel Trstenjak < daniel.trstenjak@gmail.com> wrote:
Hi all,
the current cabal file pretty printer creates output in the form:
... extra-source-files: README.md tests/inputFiles/original.cabal tests/inputFiles/setup-config tests/goldenFiles/*.cabal tests/outputFiles/.gitignore
library build-depends: base >=3 && <5, cmdargs >=0.10.5 && <0.11, lens >=4.0.1 && <4.1, strict >=0.3.2 && <0.4, Cabal
=1.18.0 && <1.19 exposed-modules: CabalBounds.Args CabalBounds.Main ... other-modules: Paths_cabal_bounds CabalBounds.Bound CabalBounds.Targets CabalBounds.Dependencies CabalBounds.Drop CabalBounds.Update CabalBounds.Lenses ...
Would a patch be accepted that creates output that is more diff friendly?
Something like:
extra-source-files: README.md tests/inputFiles/original.cabal tests/inputFiles/setup-config
library build-depends: base >=3 && <5, cmdargs >=0.10.5 && <0.11, lens >=4.0.1 && <4.1, exposed-modules: CabalBounds.Args CabalBounds.Main ... other-modules: Paths_cabal_bounds CabalBounds.Bound CabalBounds.Targets ...
Or perhaps:
extra-source-files: README.md tests/inputFiles/original.cabal tests/inputFiles/setup-config
library build-depends: base >=3 && <5, cmdargs >=0.10.5 && <0.11, lens >=4.0.1 && <4.1, exposed-modules: CabalBounds.Args CabalBounds.Main ... other-modules: Paths_cabal_bounds CabalBounds.Bound CabalBounds.Targets ...
I think that I might prefer the second one.
Greetings, Daniel _______________________________________________ cabal-devel mailing list cabal-devel@haskell.org http://www.haskell.org/mailman/listinfo/cabal-devel
_______________________________________________ cabal-devel mailing list cabal-devel@haskell.org http://www.haskell.org/mailman/listinfo/cabal-devel