From: simonpj Date: Mon, 13 Jan 2003 13:22:58 +0000 (+0000) Subject: [project @ 2003-01-13 13:22:58 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~1264 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=96b7249d85d3486bc5f3b7e70221ece41794eaed;p=ghc-hetmet.git [project @ 2003-01-13 13:22:58 by simonpj] Comment --- diff --git a/ghc/compiler/typecheck/TcRnMonad.lhs b/ghc/compiler/typecheck/TcRnMonad.lhs index a9746a7..51cd7bc 100644 --- a/ghc/compiler/typecheck/TcRnMonad.lhs +++ b/ghc/compiler/typecheck/TcRnMonad.lhs @@ -189,6 +189,12 @@ defaultDefaultTys :: [Type] defaultDefaultTys = [integerTy, doubleTy] mkImpInstEnv :: DynFlags -> ExternalPackageState -> HomePackageTable -> InstEnv +-- At the moment we (wrongly) build an instance environment from all the +-- modules we have already compiled: +-- (a) eps_inst_env from the external package state +-- (b) all the md_insts in the home package table +-- We should really only get instances from modules below us in the +-- module import tree. mkImpInstEnv dflags eps hpt = foldModuleEnv (add . md_insts . hm_details) (eps_inst_env eps)