#18516 (GHC Errors as Values) Implement "Design B" to suppress unwanted warnings
See #18516.
This MR was opened on top of wip/adinapoli-diag-reason-severity
for ease of review. It implements the Design B in the Wiki for suppressing warnings that user shouldn't see due to enabled WarningFlag
s. This is one of the two proposed designs by @rae that we are evaluating.
In particular, this makes mkMsgEnvelope
return a Maybe
. It was more invasive to implement and it can be cleaned up probably, but it should cause GHC to allocate less memory than the Design A, implemented in !5207 (closed).