Proposed changes to typechecker plugins API

Eric Seidel eric at seidel.io
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.

Eric

[1]:
https://ghc.haskell.org/trac/ghc/wiki/Plugins/TypeChecker#EmbeddingCoreExprinEvTerm



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:
> https://ghc.haskell.org/trac/ghc/wiki/Plugins/TypeChecker#Post-7.10changestoTcPluginMAPI
> 
> Questions/review/comments very welcome.
> 
> Adam
> 
> 
> -- 
> Adam Gundry, Haskell Consultant
> Well-Typed LLP, http://www.well-typed.com/
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


More information about the ghc-devs mailing list