[GHC] #2182: ghc sessions (--make, --interactive, ghc api) erroneously retain instances
GHC
ghc-devs at haskell.org
Sat Jun 20 22:13:30 UTC 2015
#2182: ghc sessions (--make, --interactive, ghc api) erroneously retain instances
-------------------------------------+-------------------------------------
Reporter: claus | Owner: ezyang
Type: bug | Status: closed
Priority: normal | Milestone: 7.10.1
Component: Compiler (Type | Version: 6.9
checker) | Keywords:
Resolution: fixed | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: GHC accepts | Test Case: T2182ghci,
invalid program | T2182ghci2, T2182
Blocked By: | Blocking: 5316
Related Tickets: | Differential Revisions: Phab:D488
-------------------------------------+-------------------------------------
Comment (by Edward Z. Yang <ezyang@…>):
In [changeset:"0cb1f5cf26fae946ca745abc5e302e62a8f66feb/ghc"]:
{{{
#!CommitTicketReference repository="ghc"
revision="0cb1f5cf26fae946ca745abc5e302e62a8f66feb"
Filter orphan rules based on imports, fixes #10294 and #10420.
Summary:
If we have an orphan rule in our database, don't apply it
unless the defining module is transitively imported by the
module we are processing. We do this by defining a new RuleEnv
data type which includes both the RuleBase as well as the set
of visible orphan modules, and threading this through the
relevant environments (CoreReader, RuleCheckEnv and ScEnv).
This is analogous to the instances fix we applied in #2182
4c834fdddf4d44d12039da4d6a2c63a660975b95, but done for RULES.
An important knock-on effect is that we can remove some buggy
code in LoadInterface which tried to avoid loading interfaces
that were loaded by plugins (which sometimes caused instances
and rules to NEVER become visible).
One note about tests: I renamed the old plugins07 test to T10420
and replaced plugins07 with a test to ensure that a plugin
import did not cause new rules to be loaded in.
Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin, goldfire
Subscribers: bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D950
GHC Trac Issues: #10420
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/2182#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list