[WIP][RFC] GHCi: Order messages according to severity
Needs RevisionPublic

Authored by niteria on Nov 21 2017, 7:59 AM.



See Note [deferSeverityLogAction] for the rationale behind this change.
I've talked with @simonmar on how to implement this properly a long time
ago, this is likely not the implementation we will want to go with.

I'm creating this to gather comments on how to implement this properly.

We've been using code similar to this for 2 years and it was met with
enthusiasm from our users.

Test Plan

I will sort it out after we agree on implementation

niteria created this revision.Nov 21 2017, 7:59 AM
niteria edited the summary of this revision. (Show Details)Nov 21 2017, 7:59 AM



niteria retitled this revision from [WIP][RFC] GHCi: Display messages according to severity to [WIP][RFC] GHCi: Order messages according to severity.Nov 21 2017, 8:01 AM

Whatever we do here should probably be consistent between GHCi and ghc --make, so that argues for moving this into GhcMake rather than having it be GHCi-specific.

Otherwise I think this approach makes a lot of sense. In fact, there's an argument for changing the way we do warnings for single module compilation: currently we only emit warnings if there were no errors, but if you split the module in two and compile both, then you would see some warnings from the first module even if the second failed. So for consistency it seems we should always emit warnings, but put the errors at the end, in both single-module and multi-module compilations.

simonmar requested changes to this revision.Nov 22 2017, 3:08 AM
This revision now requires changes to proceed.Nov 22 2017, 3:08 AM