Improve CPP support: Output checking with --write-mode=inplace #74
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#74
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?
Currently the (somewhat hidden) config setting to try cope with
CPP
disables the output check, due to the way thatCPP
preprocessing works in GHC. But with--write-mode=inplace
it would be possible toa) make backup
b) apply brittany transformation inplace
c) parse again, and revert to the backup on failure
This is some annoying logic to write (and we'd really want to ensure that this failsafe is safe of failing itself..) but might be worth it if sufficiently many people use brittany on modules that require CPP.
At the moment i put this at low priority, so this is mostly a note for future consideration.