brittany icon indicating copy to clipboard operation
brittany copied to clipboard

Arrow notation

Open ElvishJerricco opened this issue 8 years ago • 1 comments

Brittany currently fails for the entire file whenever it encounters arrow notation.

ERROR: brittany pretty printer returned syntactically invalid result.
ERROR: encountered unknown syntactical constructs:
HsProc{}

ElvishJerricco avatar Apr 14 '17 16:04 ElvishJerricco

I have looked into this. There is a good amount of special syntax involved (HsCmd), and even if most is very close to HsExpr stuff it would require some time to understand the AST and write the layouting code. This has low priority for me.

There is a workaround though - don't reformat those top-level functions containing arrow notation, and copy the untransformed input. Such a feature could be useful for other yet unsupported constructs as well. I think that is doable with relatively low effort.

lspitzner avatar Apr 15 '17 21:04 lspitzner