projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d39629e
)
Suppress ambiguity errors if any other errors occur
author
simonpj@microsoft.com
<unknown>
Fri, 8 Oct 2010 11:13:18 +0000
(11:13 +0000)
committer
simonpj@microsoft.com
<unknown>
Fri, 8 Oct 2010 11:13:18 +0000
(11:13 +0000)
compiler/typecheck/TcErrors.lhs
patch
|
blob
|
history
diff --git
a/compiler/typecheck/TcErrors.lhs
b/compiler/typecheck/TcErrors.lhs
index
0ade93c
..
1254dd6
100644
(file)
--- 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
; 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)
where
skols = foldr (unionVarSet . ic_skols) emptyVarSet (cec_encl ctxt)