diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-05-21 14:23:59 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2020-05-21 14:23:59 +0100 |
commit | 8a23efa2ea5807666201888adeb5473f95d67874 (patch) | |
tree | e4ad6a4f7e205a90f3dec9bfc7aceb64cf2efde1 /compiler/GHC/Tc/Solver/Interact.hs | |
parent | 568d7279a80cf945271f0659f11a94eea3f1433d (diff) | |
download | haskell-wip/T18213.tar.gz |
Float representational equaliieswip/T18213
This draft patch (tests and better commit msg to come) improves
the solver by floating all equality constraints out of an
implication that does not allow term-level bindings.
Fixes #18213
Diffstat (limited to 'compiler/GHC/Tc/Solver/Interact.hs')
-rw-r--r-- | compiler/GHC/Tc/Solver/Interact.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Tc/Solver/Interact.hs b/compiler/GHC/Tc/Solver/Interact.hs index d95c13cd54..799a6197dc 100644 --- a/compiler/GHC/Tc/Solver/Interact.hs +++ b/compiler/GHC/Tc/Solver/Interact.hs @@ -1079,7 +1079,7 @@ shortCutSolver dflags ev_w ev_i && gopt Opt_SolveConstantDicts dflags -- Enabled by the -fsolve-constant-dicts flag = do { ev_binds_var <- getTcEvBindsVar - ; ev_binds <- ASSERT2( not (isCoEvBindsVar ev_binds_var ), ppr ev_w ) + ; ev_binds <- ASSERT2( termEvidenceAllowed ev_binds_var, ppr ev_w ) getTcEvBindsMap ev_binds_var ; solved_dicts <- getSolvedDicts @@ -2386,7 +2386,7 @@ chooseInstance work_item -- Precondition: evidence term matches the predicate workItem finish_wanted loc theta mk_ev = do { evb <- getTcEvBindsVar - ; if isCoEvBindsVar evb + ; if not (termEvidenceAllowed evb) then -- See Note [Instances in no-evidence implications] continueWith work_item else |