Results 189 comments of Taylor Fausak
trafficstars

Dang, that's a gnarly bug! Unfortunately Brittany only barely supports GADTs. See #217, #242, and #261 for some other examples.

It seems like maybe the original issue is solved? But the inline config definitely should be documented. It's in the change log for 0.11 and in #136, but that's it.

I think you can use `-- brittany --exactprint-only`, although it still seems to format the module header. ``` sh /tmp> cat gh197.hs -- brittany --exactprint-only module Main ( main )...

As far as I know, yeah that's the only way.

Oof, that's rough. Things get a little better if you avoid the list type, but that's not practical. ``` sh # cat issue-307.hs doFuncDefine :: Type1 -> String -> [SpanW...

Here's a shorter way to reproduce the same problem: ``` sh $ cat Example.hs a :: '[c, d] $ cabal exec -- brittany Example.hs a :: '[c , d] ```

You can disable Brittany on a per-binding basis with this comment: ``` hs -- brittany-disable-next-binding ``` https://github.com/lspitzner/brittany/blob/4cb3b96f073fb391d765a38bb757c369f050e079/ChangeLog.md#01100----may-2018

I'm not sure what you mean by "patterns". It seems to me that the root issue here is that Brittany has trouble formatting type-level lists. Is that accurate?

Ah, I see. You want to be able to tell Brittany something like "don't format type-level lists" or "don't format expressions that look like this regex."

I agree with @lspitzner: I'd rather have Brittany format things properly than come up with complicated workarounds. Also regular expressions aren't powerful enough to express Haskell code that you'd want...