-- (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)