Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/b9fccbc8bc377cde8e75bce8c78470e3c4fa4018 >--------------------------------------------------------------- commit b9fccbc8bc377cde8e75bce8c78470e3c4fa4018 Author: Simon Peyton Jones <simo...@microsoft.com> Date: Thu Oct 4 17:55:38 2012 +0100 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. >--------------------------------------------------------------- compiler/typecheck/TcSimplify.lhs | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/compiler/typecheck/TcSimplify.lhs b/compiler/typecheck/TcSimplify.lhs index c0ff59d..09a5b11 100644 --- a/compiler/typecheck/TcSimplify.lhs +++ b/compiler/typecheck/TcSimplify.lhs @@ -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) _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc