X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcDeriv.lhs;h=6482e7980a0c9e37853a73e455426b5d3edff616;hb=b9235325e1dfc23cc489aa478aef852e76c4075f;hp=446bbdbf3dfa60945d6a979274cfecf4e7ec10c0;hpb=1971591f865ac0806802c476f23792ae2c89411a;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 446bbdb..6482e79 100644 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -334,9 +334,10 @@ renameDeriv is_boot gen_binds insts -- notably "con2tag" and/or "tag2con" functions. -- Bring those names into scope before renaming the instances themselves ; loc <- getSrcSpanM -- Generic loc for shared bindings - ; let aux_binds = listToBag $ map (genAuxBind loc) $ - rm_dups [] $ concat deriv_aux_binds - ; rn_aux_lhs <- rnTopBindsLHS emptyFsEnv (ValBindsIn aux_binds []) + ; let (aux_binds, aux_sigs) = unzip $ map (genAuxBind loc) $ + rm_dups [] $ concat deriv_aux_binds + aux_val_binds = ValBindsIn (listToBag aux_binds) aux_sigs + ; rn_aux_lhs <- rnTopBindsLHS emptyFsEnv aux_val_binds ; let aux_names = collectHsValBinders rn_aux_lhs ; bindLocalNames aux_names $