Fix errors caused by invalid candidates leaking from hole fits
ClosedPublic

Authored by Tritlo on Jun 29 2018, 7:59 AM.

Details

Summary

This is a one line fix (and a note) that fixes four tickets, Trac #15007, Trac #15321 and Trac #15202, Trac #15314

The issue was that errors caused by illegal candidates (according to GHC stage or being internal names) were leaking to the user, causing bewildering error messages. If a candidate causes the type checker to error, it is not a valid hole fit, and should be discarded.

As mentioned in Trac #15321, this can cause a pattern of omissions, which might be hard to discover. A better approach would be to gather the error messages, and ask users to report them as GHC bugs. This will be implemented in a subsequent change.

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.
Tritlo created this revision.Jun 29 2018, 7:59 AM
simonpj accepted this revision.Jun 29 2018, 8:30 AM
simonpj added a subscriber: simonpj.

OK. Thanks

This revision is now accepted and ready to land.Jun 29 2018, 8:30 AM

Let's land this! And close those tickets.

simonpj updated the Trac tickets for this revision.Jul 3 2018, 10:40 AM
simonpj edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.