Proposed changes to typechecker plugins API

Eric Seidel eric at
Wed May 27 14:13:37 UTC 2015

Hi Adam,

I like the addition of the new* functions for creating constraints, that
should make for a much nicer API than dealing directly with the
CtEvidence constructors!

I'm not so convinced however about embedding arbitrary CoreExprs in
EvTerms. First of all, it feels a bit strange to generate CoreExprs
before the desugarer (and we would have to add a `MonadThings TcPluginM`
instance to generate Integer and String CoreExprs).

But more importantly, based on your wiki page [1], it sounds like what
we really want is a nice API for creating dictionaries.



On Wed, May 27, 2015, at 01:33, Adam Gundry wrote:
> Hi devs,
> I thought I should flag up some proposed changes relating to typechecker
> plugins, which Christiaan, Iavor and I have been discussing. The quick
> summary:
>  * make it possible for plugins to create constraints (Phab:D909);
>  * make it easier for plugins to define special type families;
>  * embed CoreExpr in EvTerm.
> For more details, see the wiki page:
> Questions/review/comments very welcome.
> Adam
> -- 
> Adam Gundry, Haskell Consultant
> Well-Typed LLP,
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at

More information about the ghc-devs mailing list