Open
Description
Description
The REPL outputs string literals containing the escape sequence \&
but this escape sequence is not accepted as input.
To Reproduce
In the REPL:
> "\x0000001"
"\0\&1"
> "\0\&1"
Illegal character escape code at line 1, column 3
Expected behavior
The REPL outputs valid string literals.
Additional context
Haskell supports \&
to delimit a numeric escape sequence from the following characters, see The zero-width escape sequence. This is exactly the way in which the PureScript REPL uses \&
to produce canonicalized string literals. However the compiler does not actually accept this escape sequence. If it did this would provide a solution to the problem in purescript/purescript#3750.
PureScript version
0.13.8