Arrow notation #24

Open
opened 2017-04-14 18:09:26 +02:00 by ElvishJerricco · 1 comment
ElvishJerricco commented 2017-04-14 18:09:26 +02:00 (Migrated from github.com)

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{}
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{} ```
lspitzner commented 2017-04-15 23:52:49 +02:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hexagoxel/brittany#24
There is no content yet.