yav / type-nat-solver

A plugin for solving numeric constraints in GHC's type-checker
Other
50 stars 5 forks source link

Adapt to changes to GHC's internals so that the plugin compiles again… #5

Closed plaidfinch closed 8 years ago

plaidfinch commented 8 years ago
Adapt to changes to GHC's internals so that the plugin compiles against HEAD

This fixes issue #4.

Pulling in the shim package ghc-tcplugins-extra allows us to easily have
forward and backward compatibility. There is more here that could potentially
be adapted to rely on ghc-tcplugins-extra, but for now, only altering the
definition of `mkNewFact` is necessary to regain compatibility with HEAD
(and retain compatibility with 7.10).

These changes alter `mkNewFact' to be monadic (in TcPluginM), because the new
infrastructure uses EvVars to hold evidence, and generating a new EvVar requires
performing actions in TcPluginM.