X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcInstDcls.lhs;h=d428fd077247e238c3f6abc86c65ddb40fc6238f;hb=1f7da30204a9b735e8bc543a5bacf03135bcc9c7;hp=4a22f9c6a3d14e72c60e9ee40d48b9b7b64d7fd9;hpb=c1a7d1a618d86260360e8bde9429e357df95c2de;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcInstDcls.lhs b/ghc/compiler/typecheck/TcInstDcls.lhs index 4a22f9c..d428fd0 100644 --- a/ghc/compiler/typecheck/TcInstDcls.lhs +++ b/ghc/compiler/typecheck/TcInstDcls.lhs @@ -159,11 +159,11 @@ tcInstDecls1 tycl_decls inst_decls -- (3) Compute instances from "deriving" clauses; -- This stuff computes a context for the derived instance decl, so it -- needs to know about all the instances possible; hence inst_env4 - tcDeriving tycl_decls `thenM` \ (deriv_inst_info, deriv_binds, keep_alive) -> + tcDeriving tycl_decls `thenM` \ (deriv_inst_info, deriv_binds) -> addInsts deriv_inst_info $ getGblEnv `thenM` \ gbl_env -> - returnM (gbl_env { tcg_keep = tcg_keep gbl_env `unionNameSets` keep_alive }, + returnM (gbl_env, generic_inst_info ++ deriv_inst_info ++ local_inst_info, deriv_binds)