Properly writing typechecker plugins

Alexis King lexi.lambda at
Sat Aug 17 02:12:53 UTC 2019

Apologies for the long delay before replying to this, I ended up becoming very busy for a couple weeks.

> On Aug 2, 2019, at 02:57, Simon Peyton Jones <simonpj at> wrote:
> We should not need to delete solved _givens_ from the inert set.  We can augment givens with extra facts, but deleting them seems wrong.

I agree with this, so no complaints from me about that.

> There should be no Derived constraints in the inert set anyway.  They should all be in the WantedConstraints passed to runTcPluginsWanted.    They were extracted from the inert set, along with the Deriveds, by getUnsolvedInerts in solve_simple_wanteds

Upon looking at the code more carefully, you’re quite right—I was dead wrong, and typechecker plugins can solve derived constraints just fine. I spent several hours debugging the gory details this evening, and after finding the problem, I realized the bug had already been reported as issue #16735 <>. A little anticlimactic, but yet another reason to figure out how to build GHC HEAD on my machine (and maybe then I can think about submitting some of the documentation changes, too).

Thanks again,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list