lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
691 stars 67 forks source link

Assumes backticks are used consistently in patterns #234

Closed scooby closed 5 years ago

scooby commented 5 years ago

It looks like Brittany assumes backticks are used consistently in patterns.

To reproduce, Example.hs:

True `nand` True = False
nand _ _ = True

nor False False = True
_ `nor` _ = False

Running stack --resolver lts-12.9 exec --package brittany -- brittany --omit-output-check ~/tmp/Example.hs:

True `nand` True = False
`nand` _ _       = True

nor False False = True
_ nor _         = False
scooby commented 5 years ago

Given that lts-12.9 might be old, I checked with master as of 305f98f, and stack --stack-yaml stack-8.6.5.yaml exec brittany -- --omit-output-check ~/tmp/Example.hs produces the same output.

scooby commented 5 years ago

Thanks for jumping on this!