Open
Description
Describe the bug
Consider the string literal
"\^\ "
It represents a string literal with two characters: the first one is a file separator character1, and the second one is a space character.
However, we do not handle it incorrectly, due to our logic for string gaps.
-
With Ormolu 0.7.7.0 and older, it is formatted (with
--unsafe
) to"\^
(note the missing closing
"
!). -
With Ormolu 0.8.0.0, GHC fails to parse the input in the first place. This is an upstream bug (#25937), scheduled to be fixed in GHC 9.12.3.
Expected behavior
The input above should not cause any errors and be a fixed point.
Additional context
I think it makes sense to wait with fixing this until GHC 9.12.3 has been released with the fix for #25937 as mentioned above.