
#8427: GHC accepts invalid program because of EPS poisoning -------------------------------------+------------------------------------- Reporter: errge | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: GHC accepts | Difficulty: Moderate (less invalid program | than a day) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Changes (by simonpj): * priority: lowest => normal Comment: You are quite right. The current situation is manifestly a compromise. The "right" solution is * to create a fresh class-instance environment (call it `myInstEnv`) when starting to compile a module * whenever you need an interface file, go look it up; if it is not there, load it; and then (in both cases) add its class instances to `myInstEnv` * similarly add any orphan modules * to avoid repeatedly adding stuff to `myInstEnv` we'll need a set of module whose class instance are already in it. * discard `myInstEnv` when we are done with this module Similarly for rules and family instances. Once done we can delete some code in GHCi that does something very like this for the ghci command line. None of this is hard, just needs doing. Volunteers? I'll make priority 'normal'. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8427#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler