Skip to content

Commit 70c332c

Browse files
Merge pull request #430 from Soupstraw/patch-1
GHC-21231
2 parents eaa323f + 8475a82 commit 70c332c

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module EscapeSeqOutOfRange where
2+
3+
x :: Char
4+
x = '\1114111'
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module EscapeSeqOutOfRange where
2+
3+
x :: Char
4+
x = '\1114112'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: "Typo: lower-case class name"
3+
---
4+
5+
## Error Message
6+
7+
```
8+
EscapeSeqOutOfRange.hs:4:13: error:
9+
numeric escape sequence out of range at character '2'
10+
|
11+
4 | x = '\1114112'
12+
| ^
13+
```
14+
## Explanation
15+
16+
This example shows that a numeric escape sequence with a value higher than
17+
`1114111` throws an error, but a number that is within range does not.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Numeric escape sequence out of range
3+
summary: The numeric escape sequence represents a number that is too large
4+
introduced: 9.6.1
5+
severity: error
6+
---
7+
8+
The escape sequence in the `Char` literal is too large of a number. The maximum value of a numeric literal is `\1114111`
9+
(or `\x10ffff` in hexadecimal and `\o4177777` in octal).

0 commit comments

Comments
 (0)