
#9422: EPT caching on --make can make spurious instances visible -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 (Type checker) | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: GHC | Related Tickets: accepts invalid program | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by ezyang): In our most recent Backpack information, SPJ described a nice and simple way of solving this problem. Continue to maintain a global EPT, but with every type class instance, record the module it originated from. Now, when we do a lookup into the EPT table, we need to check if that module is transitively reachable from the current module; if it is not, then it is discarded. The transitivity check can be done lazily, so, hopefully, when this bad behavior doesn't occur, we can avoid doing all of the work of slurping in all the imports to figure out what type instances are available and which are not. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9422#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler