diff options
author | Oleg Grenrus <oleg.grenrus@iki.fi> | 2021-02-14 13:33:21 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-04-05 20:38:07 -0400 |
commit | 9c9adbd0ffe6ecc37d3a565811d8e79f24383943 (patch) | |
tree | 6beab45ec5caf3e406c3aecb7dfb7f4361d3fb05 /testsuite/tests/parser/unicode/T18158b.hs | |
parent | 918d5021ad74a6b7e5e027df2f7d7605d833b486 (diff) | |
download | haskell-9c9adbd0ffe6ecc37d3a565811d8e79f24383943.tar.gz |
Implement proposal 403: Lexer cleanup
This allows Other Numbers to be used in identifiers, and also documents
other, already existing lexer divergence from Haskell Report
Diffstat (limited to 'testsuite/tests/parser/unicode/T18158b.hs')
-rw-r--r-- | testsuite/tests/parser/unicode/T18158b.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/parser/unicode/T18158b.hs b/testsuite/tests/parser/unicode/T18158b.hs new file mode 100644 index 0000000000..0bd8780b31 --- /dev/null +++ b/testsuite/tests/parser/unicode/T18158b.hs @@ -0,0 +1,15 @@ +main = print ⅯⅯⅩⅩ + where ⅯⅯⅩⅩ = 11 + +-- ⅯⅯⅩⅩ is characters are in NumberLetter unicode category. +-- We now allow it to be used in identifiers, but they +-- are not lower or upper, so cannot be the first one. +-- +-- Just like 'OtherNumber' (#4373), 'ModifierLetter' (#10196) and +-- NonSpacingMark (#7650). +-- +-- > map generalCategory "ⅯⅯⅩⅩ" +-- [LetterNumber,LetterNumber,LetterNumber,LetterNumber] +-- +-- > map show "ⅯⅯⅩⅩ" +-- ["'\\8559'","'\\8559'","'\\8553'","'\\8553'"] |