Closed conal closed 8 years ago
Added some spelling corrections.
Just that nit, otherwise happy to merge!
Great! I'll make the changes, compile on both 7.10.3 and 8.0.* and re-push.
Compiled fine under 7.10.3 and 8.0. Ready to go.
Thanks for the patch!
I needed to generate and add GHC rewrite rules, so I extended the
HasCoreRules
classSome alternatives:
ReadBindings
andAddBindings
. For consistency, I guess we'd want "ReadCoreRules
" and "AddCoreRules
", but that'd be a lot of change to client code.addHermitCoreRule :: CoreRule -> c -> c
. The[CoreRule]
version is perhaps a little more efficient for multiple rules (compared with repeated single additions), while theCoreRule
version is more efficient for a single rule. Or maybe not, given GHC's SpecConstr transformation.addHermitCoreRules
withsetHermitCoreRules
, since we can buildaddHermitCoreRules
fromhermitCoreRules
andsetHermitCoreRules
.I'm happy to tweak and resubmit.