Characters are not equal to their Unicode escape counterparts
In Elm, Char
s can be written as an unicode escape, for example '\u{000A}'
for '\n'
.
These two characters are equal in Elm ('\u{000A}' == '\n'
is True
), but they are not in our program, as they are converted into two different integer lists.
For '\u{000A}'
it is the following list (which interestingly is \u000A
when converted to a String, missing the curly brackets):
(|::#1| #x0000005c
(|::#1| #x00000075
(|::#1| #x00000030
(|::#1| #x00000030
(|::#1| #x00000030
(|::#1| #x00000061 |[]#1|)))))))
For '\n'
, it's just (|::#1| #x0000005c (|::#1| #x0000006e |[]#1|))
, which is \n
when converted to a String.
Can this be fixed easily or is it more complicated?