X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FInst.lhs;h=5e9d985ca2a5b9cf3bfca41dd0b10d74c51cb5f2;hb=19b44dcc5e5b9f92735fa99aa45dfaa94777177c;hp=d75a7cd290c59c0252668d98d4638fbe06c35e27;hpb=2e68d0410f319a99f3f36c5e9d9be656ca10dc70;p=ghc-hetmet.git diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs index d75a7cd..5e9d985 100644 --- a/compiler/typecheck/Inst.lhs +++ b/compiler/typecheck/Inst.lhs @@ -94,6 +94,7 @@ import DynFlags import Bag import Maybes import Util +import Unique import Outputable import Data.List import TypeRep @@ -602,12 +603,16 @@ pprInst i@(EqInst {tci_left = ty1, tci_right = ty2, tci_co = co}) = eitherEqInst i (\covar -> text "Wanted" <+> ppr (TyVarTy covar) <+> dcolon <+> ppr (EqPred ty1 ty2)) (\co -> text "Given" <+> ppr co <+> dcolon <+> ppr (EqPred ty1 ty2)) -pprInst inst = ppr (instName inst) <+> dcolon - <+> (braces (ppr (instType inst)) $$ +pprInst inst = ppr name <> braces (pprUnique (getUnique name)) <+> dcolon + <+> (braces (ppr (instType inst) <> implicWantedEqs) $$ ifPprDebug implic_stuff) where - implic_stuff | isImplicInst inst = ppr (tci_reft inst) - | otherwise = empty + name = instName inst + (implic_stuff, implicWantedEqs) + | isImplicInst inst = (ppr (tci_reft inst), + text " &" <+> + ppr (filter isEqInst (tci_wanted inst))) + | otherwise = (empty, empty) pprInstInFull inst@(EqInst {}) = pprInst inst pprInstInFull inst = sep [quotes (pprInst inst), nest 2 (pprInstArising inst)]