on master help sign in
Improve error for bad escape characters
64b16e6Evan Czaplicki
src/Reporting/Error/Syntax.hs+4−4
@@ -463,11 +463,11 @@ problemToReport subRegion problem =
463
463
464 BadEscape ->
464 BadEscape ->
465 parseReport
465 parseReport
466− "Ran into a bad escape code."
466+ "A backslash starts an escaped character, but I do not recognize this one:"
467 ( reflowParagraph
467 ( reflowParagraph
468− "Elm allows typical escape characters like \\n and \\t, but you can\
468+ "Elm allows typical escape characters like \\\\ and \\n and \\t. You can\
469− \ also use \\x0040 to refer to unicode characters by their hex code.\
469+ \ also say \\u0040 to refer to unicode characters by their hex code.\
470− \ It seems like something has gone wrong with one of these codes."
470+ \ Maybe there is some typo?"
471 )
471 )
472
472
473 BadChar ->
473 BadChar ->