[GHC] #13102: orphan family instances can leak through the EPS in --make mode
GHC
ghc-devs at haskell.org
Wed Jan 11 00:07:37 UTC 2017
#13102: orphan family instances can leak through the EPS in --make mode
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.1
Resolution: | 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: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
Aha! You are right! The relevant ticket is #2182. One thing unsaid there
is that non-orphan instances cannot be a problem because the module
defining a non-orphan instance must be in the transitive closure of
modules below the one being compiled. It's just orphan modules that we
need to take care about.
A huge shortcoming is that this very cunning plan has no Note describing
the Grand Plan, at least not that I can see. There ought to be one, with
references to the note from the scattered bits of code that implement it.
It does seem plausible that that the same thing would work for family
instances. Hooray.
Finally `hptInstances` appears to do the job (including family instances)
for the home package, by glomming up all the instances from the home-
package modules below this one. But the clever orphan module approach
should work for the home package too, so perhaps we can kill off
`hptInstances`?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13102#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list