Adding rules in a plugin?
Conal Elliott
conal at conal.net
Wed Feb 10 02:47:38 UTC 2016
I'm writing a GHC plugin that generates new rules. The top-level identifier
for the new rules' LHSs is always the same and is imported from another
module. One of the arguments in the rule's LHSs, however, is defined in
that module. I'm creating rules and adding them to the mg_rules of the
module's ModGuts. I don't see them in the .hi files (viewed with "ghc
--show-iface Foo.hi"), and they're not getting found in modules that import
the modules where I'm trying to generate rules. Am I missing a crucial
step? For instance, do I need also to use `addIdSpecialisations` with the
argument identifiers, and if so, need I replace all instances of those
identifiers in the module or just some of them?
Thanks, -- Conal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160209/6069354c/attachment.html>
More information about the ghc-devs
mailing list