From: Manuel M T Chakravarty Date: Fri, 29 Dec 2006 20:33:00 +0000 (+0000) Subject: Make dicts for arbitrary type equalities X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=02c48cf14cd8c7771dfb41089412f35e1eaeedd5 Make dicts for arbitrary type equalities --- 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}