Cabal File Pretty Printer

2014-02-26 Thread Daniel Trstenjak
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

Re: Cabal File Pretty Printer

2014-02-26 Thread Carter Schonwald
I don't see why not. On Wednesday, February 26, 2014, Daniel Trstenjak daniel.trsten...@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

Re: Cabal File Pretty Printer

2014-02-26 Thread Johan Tibell
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

Re: Cabal File Pretty Printer

2014-02-26 Thread Tillmann Rendel
Hi, Johan Tibell wrote: 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` Many cabal files are generated by `cabal init`, which uses a consistent style that is different

Re: Cabal File Pretty Printer

2014-02-26 Thread Johan Tibell
On Wed, Feb 26, 2014 at 3:51 PM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: 1. change `cabal init` to use the pretty printer. 2. expose the pretty printer at the command line. Agreed on both points. We should add (2) as `cabal format` (similar to go-fmt) or something like

Re: Cabal File Pretty Printer

2014-02-26 Thread Brandon Allbery
On Wed, Feb 26, 2014 at 10:01 AM, Johan Tibell johan.tib...@gmail.comwrote: On Wed, Feb 26, 2014 at 3:51 PM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: 1. change `cabal init` to use the pretty printer. 2. expose the pretty printer at the command line. Agreed on both