From 02c48cf14cd8c7771dfb41089412f35e1eaeedd5 Mon Sep 17 00:00:00 2001 From: Manuel M T Chakravarty Date: Fri, 29 Dec 2006 20:33:00 +0000 Subject: [PATCH] Make dicts for arbitrary type equalities --- compiler/typecheck/Inst.lhs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs index b0fe5f9..49fc942 100644 --- a/compiler/typecheck/Inst.lhs +++ b/compiler/typecheck/Inst.lhs @@ -333,11 +333,10 @@ mkPredName uniq loc pred_ty IParam ip _ -> getOccName (ipNameName ip) EqPred ty _ -> mkEqPredCoOcc baseOcc where - -- we use the outermost tycon of the lhs, which must be a type - -- function, as the base name for an equality + -- we use the outermost tycon of the lhs, if there is one, to + -- improve readability of Core code baseOcc = case splitTyConApp_maybe ty of - Nothing -> - pprPanic "Inst.mkPredName:" (ppr ty) + Nothing -> mkOccName tcName "$" Just (tc, _) -> getOccName tc \end{code} -- 1.7.10.4