Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/cc047084f6842f10a0767e976bde6c93582b53e7 >--------------------------------------------------------------- commit cc047084f6842f10a0767e976bde6c93582b53e7 Author: Simon Peyton Jones <[email protected]> Date: Fri Feb 10 10:46:16 2012 +0000 Put only local instances in the interactive context (fixes Trac #5820) In HscMain.hscDeclsWithLocaion, we were grabbing class instances from the tcg_inst_env field of the TcGblEnv. But that's wrong: that field contains all the *home-package* instances. Instead we need the tct_insts field, which has just the instances from the module being compiled. >--------------------------------------------------------------- compiler/main/HscMain.hs | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs index 938d328..1fe9077 100644 --- a/compiler/main/HscMain.hs +++ b/compiler/main/HscMain.hs @@ -1430,8 +1430,8 @@ hscDeclsWithLocation hsc_env str source linenumber = runHsc hsc_env $ do -- We grab the whole environment because of the overlapping that may have -- been done. See the notes at the definition of InteractiveContext -- (ic_instances) for more details. - let finsts = famInstEnvElts $ tcg_fam_inst_env tc_gblenv - insts = instEnvElts $ tcg_inst_env tc_gblenv + let finsts = tcg_fam_insts tc_gblenv + insts = tcg_insts tc_gblenv {- Desugar it -} -- We use a basically null location for iNTERACTIVE _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
