X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcErrors.lhs;h=1254dd6aae252a61eac33231c3ed9f99502b820a;hb=201145f80c2c797badceabd0287cc7f5e98302aa;hp=0ade93c29f0bb83e4324444e0eb62d7709cf5458;hpb=5e86045ae5f90d9138e395fde5792e50ac8f8afd;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcErrors.lhs b/compiler/typecheck/TcErrors.lhs index 0ade93c..1254dd6 100644 --- a/compiler/typecheck/TcErrors.lhs +++ b/compiler/typecheck/TcErrors.lhs @@ -125,10 +125,9 @@ reportTidyWanteds ctxt unsolved ; when (null tv_eqs) $ groupErrs (reportFlat ctxt) others ; when (null tv_eqs) $ mapBagM_ (reportTidyImplic ctxt) implics - -- Only report ambiguity if no other errors happened - -- See Note [Avoiding spurious errors] - ; when (isEmptyBag implics && null non_ambigs) $ - reportAmbigErrs ctxt skols ambigs } + -- Only report ambiguity if no other errors (at all) happened + -- See Note [Avoiding spurious errors] in TcSimplify + ; ifErrsM (return ()) $ reportAmbigErrs ctxt skols ambigs } where skols = foldr (unionVarSet . ic_skols) emptyVarSet (cec_encl ctxt)