Skip to content
Snippets Groups Projects

Enable maxBound checks for OverloadedLists (Fixes #18172)

Closed Roland Senn requested to merge RolandSenn/ghc:T18172 into master

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.

Edited by Roland Senn

Merge request reports

Merge request pipeline #21287 passed with warnings

Merge request pipeline passed with warnings for 6dd40d6c

Closed by Ben GamariBen Gamari 4 years ago (Jun 26, 2020 3:00am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ryan Scott
  • Ryan Scott
  • Ryan Scott
  • Ryan Scott
  • Thanks offering this MR. But what ticket is it solving (ticket = problem, MR = solution)? Is there a user-visible bug? Or is this a perf enhancement? Or what?

    Thanks

  • Author Developer

    @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.

  • Roland Senn marked as a Work In Progress

    marked as a Work In Progress

  • Roland Senn changed the description

    changed the description

  • Roland Senn resolved all threads

    resolved all threads

  • Author Developer

    @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 the Item constructor in the [Word8] case.

  • Roland Senn added 1 commit

    added 1 commit

    Compare with previous version

  • Roland Senn added 8 commits

    added 8 commits

    Compare with previous version

  • Roland Senn resolved all threads

    resolved all threads

  • Roland Senn unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Roland Senn changed the description

    changed the description

  • Roland Senn added 21 commits

    added 21 commits

    Compare with previous version

  • Roland Senn resolved all threads

    resolved all threads

  • Ben Gamari
  • Ben Gamari approved this merge request

    approved this merge request

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading