
25 Jun
2018
25 Jun
'18
1:58 p.m.
Dmitriy Kovanikov
Thanks a lot for your suggestion! I’ve looked into GHC source plugins. And, specifically, into your `hashtag-coerce` example:
* https://github.com/mpickering/hashtag-coerce https://github.com/mpickering/hashtag-coerce
As far as I can see, this allows only to analyse source code (to produce warnings or errors).
It depends upon which type of source plugin you are using. There are a few points in the compilation pipeline that source plugins allow you to plug in to. Some of these allow the plugin to modify the AST while others only allow inspection. See the users guide [1] for details. Cheers, - Ben [1] https://github.com/ghc/ghc/blob/master/docs/users_guide/extending_ghc.rst#so...