GHC rewrite rules and constructor wrappers?
conal at conal.net
Tue Apr 29 22:02:53 UTC 2014
I'm trying to sort out the relationship of GHC rewrite rules and
constructor wrappers. I have rules like
> "reify/(:<)" reifyEP (:<) = kPrim VecSP
This rule seems to fire for `reifyEP ($W:<)` rather than `reifyEP (:<)`. If
I'm tracking (uncertain), `($W:<)` inlines to `(:<)`. Sometimes I'm able to
preserve the `$W` form, but sometimes I get the bare form when inlining a
definition from another already-compiled module. In those cases, I don't
know how to get my rules to fire.
Advice and explanation appreciated, including pointers explanations of the
role of these wrappers in GHC.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs