Rewriting plugins: request for feedback

Sam Derbyshire sam.derbyshire at gmail.com
Fri Jun 25 22:54:41 UTC 2021


Hi everyone,

Just a short message to let authors of type-checking plugins know that I've
updated the ghc-tcplugin-api library with backwards compatibility for GHC
9.0 and 9.2.
The functionality for rewriting type family applications will obviously not
be present on those versions, but I hope this will allow plugin authors to
try out the API for themselves and see what they think.

It shouldn't be much different from what you are used to; mostly a change
from "TcPluginM a" to MTL-style "MonadTcPlugin m => m a", or explicit
solver monad  "TcPluginM Solve a".
The main improvements that this library offers in its current state are, in
my opinion, as follows:
  - Decoupling from GHC, which has several upsides:
    - needs of plugin authors can be addressed rapidly without needing to
wait for new GHC releases (of course, this doesn't apply to the changes
which require commensurate changes to GHC),
    - cross-compatibility across GHC versions, hopefully lightening the CPP
burden on plugin authors.
  - More extensive documentation that should help people get started with
typechecking plugins. The haddocks remain available at the same page:
https://sheaf.github.io/ghc-tcplugin-api/GHC-TcPlugin-API.html

The library is available on the GitHub repository as before:
https://github.com/sheaf/ghc-tcplugin-api
I will upload the library to Hackage soon.

Thanks all,

Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20210626/3d83cde0/attachment.html>


More information about the ghc-devs mailing list