From: Manuel M T Chakravarty Date: Wed, 27 Jun 2007 09:42:00 +0000 (+0000) Subject: Fix names of coercions in newtype instances X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=68f606a04198beb15b577ebc951d34a313710cdc;p=ghc-hetmet.git Fix names of coercions in newtype instances - Thanks to Roman for spotting the problem. --- diff --git a/compiler/basicTypes/MkId.lhs b/compiler/basicTypes/MkId.lhs index 535faef..f72afb9 100644 --- a/compiler/basicTypes/MkId.lhs +++ b/compiler/basicTypes/MkId.lhs @@ -72,7 +72,7 @@ import Outputable import FastString import ListSetOps import Module -\end{code} +\end{code} %************************************************************************ %* * diff --git a/compiler/basicTypes/OccName.lhs b/compiler/basicTypes/OccName.lhs index 8de65b8..bc11cbd 100644 --- a/compiler/basicTypes/OccName.lhs +++ b/compiler/basicTypes/OccName.lhs @@ -445,7 +445,7 @@ mkIPOcc = mk_simple_deriv varName "$i" mkSpecOcc = mk_simple_deriv varName "$s" mkForeignExportOcc = mk_simple_deriv varName "$f" mkNewTyCoOcc = mk_simple_deriv tcName ":Co" -mkInstTyCoOcc = mk_simple_deriv tcName ":Co" -- derived from rep ty +mkInstTyCoOcc = mk_simple_deriv tcName ":CoF" -- derived from rep ty mkEqPredCoOcc = mk_simple_deriv tcName "$co" -- Generic derivable classes diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs index 49425a4..191e546 100644 --- a/compiler/typecheck/TcTyClsDecls.lhs +++ b/compiler/typecheck/TcTyClsDecls.lhs @@ -314,7 +314,7 @@ tcFamInstDecl1 (decl@TyData {tcdND = new_or_data, tcdLName = L loc tc_name, case new_or_data of DataType -> return (mkDataTyConRhs data_cons) NewType -> ASSERT( isSingleton data_cons ) - mkNewTyConRhs tc_name tycon (head data_cons) + mkNewTyConRhs rep_tc_name tycon (head data_cons) ; buildAlgTyCon rep_tc_name t_tvs stupid_theta tc_rhs Recursive False h98_syntax (Just (family, t_typats)) -- We always assume that indexed types are recursive. Why?