[GHC] #13614: Rewrite rules not applied exhaustively when simplifying from plugin
GHC
ghc-devs at haskell.org
Wed Apr 26 22:53:35 UTC 2017
#13614: Rewrite rules not applied exhaustively when simplifying from plugin
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone:
Component: GHC API | Version: 8.1
Resolution: worksforme | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by nomeata):
* status: new => closed
* resolution: => worksforme
Comment:
Ok, it seems that `CoreM`’s `getRuleBase` only returns the rules from the
current home package. To get the rules from the external package, I have
to use `getHscEnv`:
{{{
hpt_rule_base <- getRuleBase
hsc_env <- getHscEnv
eps <- liftIO $ hscEPS hsc_env
let rule_base1 = unionRuleBase hpt_rule_base (eps_rule_base eps)
rule_base2 = extendRuleBaseList rule_base1 (mg_rules guts)
vis_orphs <- getVisibleOrphanMods
let rule_env = RuleEnv rule_base2 vis_orphs
}}}
Thanks for your help!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13614#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list