Make Control.Exception.throw levity polymorphic.
ClosedPublic

Authored by Ninjatrappeur on Jun 10 2018, 8:36 AM.

Details

Summary

This fixes Trac #15180 by changing the throw function type signature.

Test Plan

Validate.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Ninjatrappeur created this revision.Jun 10 2018, 8:36 AM

Something obviously went wrong, sorry >< This is the first time I use this tooling, I'm gonna fix this shortly.

Removing unecessary files.

Please add a note about this change in changelog.md of base library.

Added relevant changelog entry.

I am a bit puzzled by the CI failure. I don't get why the runner cannot run ./validate.

Did I mess something up here?

I am a bit puzzled by the CI failure. I don't get why the runner cannot run ./validate.

Did I mess something up here?

We're getting stat failures on OS X; at a quick glance it looks like making throw more polymorphic causes GHC to allocate too much (but not by a lot) on OS X for two test cases. Looking at the test cases, I can't see why that would be - neither involves any explicit exception functionality. But since the difference is only a tiny bit above the threshold (5.3% vs. acceptable 5%), it is very well possible that this change produces a slight performance degradation across the board, and these two test cases on OS X are the only ones that are pushed over the edge.

So one thing I might do is to do two runs of validate, with and without this patch, and check whether the performance metrics do indeed get worse overall (even though staying within the margins).

The stats number of these two failed tests are bumped up in 229789ab27851436a522c38ac5. However the base of this phab is a9eb645bb1e6bbaee35, which is earlier than that commit. I think it's ok to let this one merged.

sighingnow accepted this revision.Jun 13 2018, 3:24 AM
This revision is now accepted and ready to land.Jun 13 2018, 3:24 AM
This revision was automatically updated to reflect the committed changes.