diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2018-01-31 11:35:33 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2018-01-31 11:35:33 +0000 |
commit | e7c3878dacbad8120aacbe4423857b5ca9b43eb4 (patch) | |
tree | 05fafd74bf4db47918e642bb87afe959ee1f32ed /compiler | |
parent | 47031db4ba0677ede438526770ab23908257fc5c (diff) | |
download | haskell-e7c3878dacbad8120aacbe4423857b5ca9b43eb4.tar.gz |
Move zonkWC to the right place in simplfyInfer
runTcSWithEvBinds does some unification, so the zonkWC
must be after, not before! Yikes. An outright bug.
This fixes Trac #14715.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/typecheck/TcSimplify.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs index 08c781d78c..b92ebfd862 100644 --- a/compiler/typecheck/TcSimplify.hs +++ b/compiler/typecheck/TcSimplify.hs @@ -649,9 +649,7 @@ simplifyInfer rhs_tclvl infer_mode sigs name_taus wanteds psig_givens = mkGivens loc psig_theta_vars ; _ <- solveSimpleGivens psig_givens -- See Note [Add signature contexts as givens] - ; wanteds' <- solveWanteds wanteds - ; TcS.zonkWC wanteds' } - + ; solveWanteds wanteds } -- Find quant_pred_candidates, the predicates that -- we'll consider quantifying over @@ -659,6 +657,7 @@ simplifyInfer rhs_tclvl infer_mode sigs name_taus wanteds -- the psig_theta; it's just the extra bit -- NB2: We do not do any defaulting when inferring a type, this can lead -- to less polymorphic types, see Note [Default while Inferring] + ; wanted_transformed_incl_derivs <- TcM.zonkWC wanted_transformed_incl_derivs ; let definite_error = insolubleWC wanted_transformed_incl_derivs -- See Note [Quantification with errors] -- NB: must include derived errors in this test, |