Skip to content
Snippets Groups Projects

#18516 (GHC Errors as Values) Implement "Design A" to suppress unwanted warnings

Closed #18516 (GHC Errors as Values) Implement "Design A" to suppress unwanted warnings
Closed Alfredo Di Napoli requested to merge wip/adinapoli-suppress-warning-design-a into master

See #18516.

This MR was opened on top of wip/adinapoli-diag-reason-severity for ease of review. It implements the Design A in the Wiki for suppressing warnings that user shouldn't see due to enabled WarningFlags. This is one of the two proposed designs by @rae that we are evaluating.

In particular, this introduces a new Severity constructor called SevIgnore, which is used to suppress WarningWithFlag diagnostics for which the particular flag is not set. It also allowed us to simplify the GHC.Tc.Errors further, in a quite nice way.

Under both designs, we don't need to check anymore if a particular warning flag is set before generating the relevant diagnostic: rather, we always generate and collect it, but we discard it at the end if it turns out the user is not supposed to see it. This was simple to code but it's potentially very performance taxing (thus the need to explore design B).

I have run only a selection of 125 tests locally (CI will give us proper perf results) but it seems like time performance is roughly the same. More interesting will be, of course, memory allocations.

Merge request reports

Merge request pipeline #33885 passed with warnings

Merge request pipeline passed with warnings for 43e5cee5

Approval is optional

Closed by Marge BotMarge Bot 4 years ago (Apr 6, 2021 12:39am UTC)

Merge details

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Richard Eisenberg
  • Richard Eisenberg
  • Richard Eisenberg
  • Alfredo Di Napoli added 58 commits

    added 58 commits

    Compare with previous version

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