lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
690 stars 72 forks source link

Using operators beginning with : (colon) in prefix notation leads to a "syntactically invalid result" #256

Closed JakobBruenker closed 4 years ago

JakobBruenker commented 5 years ago
f ((:) a as) = undefined

leads to ERROR: brittany pretty printer returned syntactically invalid result.

The same happens for any other operator that starts with :.

This doesn't happen with

f (a : as) = undefined

(Ironically, the reason I'm using them in prefix notation is because hlint can only deal with (:#) in prefix notation.)

lspitzner commented 5 years ago

Fixed in 702b993dabe54efdf0736a469df40e04dc2c9a8b, will merge into master once tests are green.

tfausak commented 4 years ago

Looks like this is fixed, at least in version 0.12.1.1.