Commit b9fccbc8 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Do not do type-class defaulting if there are insoluble constraints

Type-class defaulting won't help with those insolubles,
and it does make arbitrary choices that obfuscate the
error messages from the insolubles.
parent 629d1f48
......@@ -79,7 +79,9 @@ simplifyTop wanteds
; simpl_top_loop wc_first_go }
simpl_top_loop wc
| isEmptyWC wc
| isEmptyWC wc || insolubleWC wc
-- Don't do type-class defaulting if there are insolubles
-- Doing so is not going to solve the insolubles
= return wc
| otherwise
= do { wc_residual <- nestTcS (solve_wanteds_and_drop wc)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment