GHC API question: resolving dependencies for modules

Ben Gamari ben at
Mon Jun 25 17:58:48 UTC 2018

Dmitriy Kovanikov <kovanikov at> writes:

> Thanks a lot for your suggestion! I’ve looked into GHC source plugins. 
> And, specifically, into your `hashtag-coerce` example:
> * <>
> 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.


- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <>

More information about the ghc-devs mailing list