Enable maxBound checks for OverloadedLists (Fixes #18172)
Consider the Literal [256] :: [Data.Word.Word8]
When the OverloadedLists
extension is not active, then the ol_ext
field
in the OverLitTc
record that is passed to the function getIntegralLit
contains the type Word8
. This is a simple type, and we can use its
type constructor immediately for the warnAboutOverflowedLiterals
function.
When the OverloadedLists
extension is active, then the ol_ext
field
contains the type family Item [Word8]
. The function nomaliseType
is used
to convert it to the needed type Word8
.
Merge request reports
Activity
- Resolved by Roland Senn
- Resolved by Roland Senn
- Resolved by Roland Senn
- Resolved by Roland Senn
- Resolved by Roland Senn
@simonpj: Thanks for you comment. In the MR title I wrote (Fixes #18172 (closed)). So following the
DRY
principle, I didn't repeat it in the text. And yes, this is a user visible bug.@RyanGlScott Thanks for your code review. I'll switch this MR to WIP. I'll investigate an other solution path: As with the case for
[Maybe Word8]
we shouldn't see theItem
constructor in the[Word8]
case.added 1 commit
- 0f9818e4 - Enable maxBound checks for OverloadedLists (Fixes #18172 (closed))
added 8 commits
-
0f9818e4...eb8115a8 - 7 commits from branch
ghc:master
- 7c3c1c49 - Enable maxBound checks for OverloadedLists (Fixes #18172 (closed))
-
0f9818e4...eb8115a8 - 7 commits from branch
added 21 commits
-
7c3c1c49...d4a0be75 - 20 commits from branch
ghc:master
- 1d437314 - Enable maxBound checks for OverloadedLists (Fixes #18172 (closed))
-
7c3c1c49...d4a0be75 - 20 commits from branch
- Resolved by Roland Senn