Formatting error (run-together identifiers) #67
Labels
No Label
blocked: dependency
blocked: info-needed
bug
duplicate
enhancement
fixed in HEAD
help wanted
hs:arrows
hs:brackets
hs:classes
hs:comments
hs:do-notation
hs:guards
hs:lists
hs:operators
hs:patterns
hs:records
hs:types
invalid
language extension support
layouting
needs confirmation
priority: high
priority: low
question
revisit before next release
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hexagoxel/brittany#67
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Using
brittany
on this fragment introduces an error.Input:
Output:
The expression
xs G.!
(apply operator!
imported from moduleG
) gets mis-printed asxsG.!
(operator!
from modulexsG
), i.e. a space is missing.I just updated Brittany from Github:
Right. Is anyone opposed to changing whitespace handling in sections to always insert whitespace between argument and operator? I think this would be a more established default. Some use exceptions for (:) and arithmetic operators, but I could do without exceptions.
I could do without exceptions.
I thought that Brittany had internal fail-safes to prevent misprints like this, i.e. that the emitted code parses back to the same syntax tree. How did this fail in this case?
That's a good point. The current failsafe only tests that the output is syntactically valid, which it is in this case. Checking that the (not location-dependent parts of the) syntaxtrees remain equal is a good idea. I'll open a new ticket for that.
thanks for reporting!