Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
d9ea938b
Commit
d9ea938b
authored
Jul 10, 2012
by
Simon Peyton Jones
Browse files
Suppress ambiguity errors if there are other solid errors to report
parent
a8c9f7fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/TcErrors.lhs
View file @
d9ea938b
...
...
@@ -79,7 +79,10 @@ reportUnsolved runtimeCoercionErrors wanted
; let tidy_env = tidyFreeTyVars env0 free_tvs
free_tvs = tyVarsOfWC wanted
err_ctxt = CEC { cec_encl = []
, cec_insol = errs_so_far
, cec_insol = errs_so_far || insolubleWC wanted
-- Don't report ambiguity errors if
-- there are any other solid errors
-- to report
, cec_extra = empty
, cec_tidy = tidy_env
, cec_defer = defer }
...
...
@@ -236,6 +239,7 @@ mkReporter mk_err = mapM_ (\ct -> do { err <- setCtFlavorLoc (cc_ev ct) $
; reportError err })
tryReporters :: [(String, Ct -> PredTree -> Bool, Reporter)] -> Reporter -> Reporter
-- Use the first reporter in the list whose predicate says True
tryReporters reporters deflt cts
= do { traceTc "tryReporters {" (ppr cts)
; go reporters cts
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment