Plugins: Accessing unexported bindings

Levent Erkok erkokl at
Sun Dec 6 07:01:29 UTC 2015


The mg_binds field of the ModGuts seem to only contain the bindings that
are exported from the module being compiled.

I guess GHC must be running user-plugins after it drops the bindings that
are not exported, which makes perfect sense for most use cases. However,
I'm working on a plugin where the end-programmer embeds "properties" in the
form of functions inside his/her code, which are not necessarily exported
from the module under consideration.

Is there a way to access all top-level bindings in a module from a plugin,
even if those bindings are not exported?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list