Elm Exactly

Figurecore-escapes

Figure 1, Escape Sequences, in Section 2.2 Special Constants.

\nline feed (U+000A)
\rcarriage return (U+000D)
\thorizontal tab (U+0009)
\""
\''
\\\
\u{hh}the character with code point hh, read in hexadecimal
Figure 1: Escape Sequences
Read it in its chapter路Permanent address: /standard/figures/core-escapes

Referred to from

Tests (7)

  • elm / AstralCharLiteralTest
    A `Char` literal above U+FFFF has its full code point: `'\u{1F600}'` is 128512, and is the same character as `'馃榾'` written directly.
  • elm / CharAstralRecordFieldTest
    An astral `Char` (code point above 0xFFFF) in a record field keeps its code point, next to an `Int` field and after a record update, and a record holding one is equal to a record literal with the same fields.
  • elm / CharLiteralSurrogateEscapeTest
    `'\u{D800}'` is not a Char literal: a surrogate code point is not a character.
  • elm / CharUnicodeTest
    `Char.toCode` of non-ASCII character literals written as `\u{...}` escapes gives their code points: 955 for U+03BB and 8364 for U+20AC.
  • elm / ParseErrorStringEscapeTooFewDigitsTest
    A Unicode escape in a string with only two hex digits, `"\u{41}"`, is rejected with a BAD UNICODE ESCAPE syntax error.
  • elm / ParseErrorStringEscapeUnclosedTest
    A Unicode escape in a string with no closing brace, `"\u{12"`, is rejected with a BAD UNICODE ESCAPE syntax error.
  • elm / StandardA8SurrogateEscapeTest
    `\u{D800}` is not an escape sequence: a surrogate code point is not a character.

Discussions

Discuss this figure路Search the discussions on GitHub

Discussions are on GitHub; one about this figure has [fig:core-escapes] in its title.

A Standard Definition of Elm? (Draft version 0.4) 漏 Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.