[GHC] #10294: Missing instances if compiling with -fplugin

GHC ghc-devs at haskell.org
Sat Jun 20 22:13:30 UTC 2015


#10294: Missing instances if compiling with -fplugin
-------------------------------------+-------------------------------------
        Reporter:  jscholl           |                   Owner:
            Type:  bug               |                  Status:  closed
        Priority:  normal            |               Milestone:
       Component:  Compiler (Type    |                 Version:  7.10.1
  checker)                           |                Keywords:
      Resolution:  duplicate         |            Architecture:  x86_64
Operating System:  Linux             |  (amd64)
 Type of failure:  GHC rejects       |               Test Case:
  valid program                      |                Blocking:
      Blocked By:  10420             |  Differential Revisions:
 Related Tickets:                    |
-------------------------------------+-------------------------------------

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/10294#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list