X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcErrors.lhs;h=c040473e65ee7157eb334008791479afcb47d636;hb=d93785d99261a433075dcbac8c388730a4dec64f;hp=873af7385c11354943dfd05376fa6e9f0140a9af;hpb=bac10a99aba7d223d70b93f398d5239a166e929f;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcErrors.lhs b/compiler/typecheck/TcErrors.lhs index 873af73..c040473 100644 --- a/compiler/typecheck/TcErrors.lhs +++ b/compiler/typecheck/TcErrors.lhs @@ -343,11 +343,9 @@ getUserGivens (CEC {cec_encl = ctxt}) where givens = foldl (\gs ic -> ic_given ic ++ gs) [] ctxt user_givens | opt_PprStyle_Debug = givens - | otherwise = filterOut isSelfDict givens - -- In user mode, don't show the "self-dict" given - -- which is only added to do co-inductive solving - -- Rather an awkward hack, but there we are - -- This is the only use of isSelfDict, so it's not in an inner loop + | otherwise = filterOut isSilentEvVar givens + -- In user mode, don't show the "silent" givens, used for + -- the "self" dictionary and silent superclass arguments for dfuns \end{code} @@ -595,10 +593,13 @@ reportDictErrs ctxt wanteds orig <+> ptext (sLit "to the context of") , nest 2 $ pprErrCtxtLoc ctxt ] - fixes2 | null instance_dicts = [] - | otherwise = [sep [ptext (sLit "add an instance declaration for"), - pprTheta instance_dicts]] - instance_dicts = filterOut isTyVarClassPred wanteds + fixes2 = case instance_dicts of + [] -> [] + [_] -> [sep [ptext (sLit "add an instance declaration for"), + pprTheta instance_dicts]] + _ -> [sep [ptext (sLit "add instance declarations for"), + pprTheta instance_dicts]] + instance_dicts = filterOut isTyVarClassPred wanteds -- Insts for which it is worth suggesting an adding an -- instance declaration. Exclude tyvar dicts.