[commit: ghc] master: A little outright bug in canEqTyVar2 (168c883)

git at git.haskell.org git at git.haskell.org
Wed Apr 29 14:05:15 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/168c88312b4ebe595c4332dde460e987f6fd9108/ghc

>---------------------------------------------------------------

commit 168c88312b4ebe595c4332dde460e987f6fd9108
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Apr 29 11:23:05 2015 +0100

    A little outright bug in canEqTyVar2
    
    I had 'ev' where I should have had 'new_ev'.  It's quite hard to make
    this bug cause a failure, but I did eventually get a Lint error
    somewhere.  Anyway, it's just a typo, I think.


>---------------------------------------------------------------

168c88312b4ebe595c4332dde460e987f6fd9108
 compiler/typecheck/TcCanonical.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs
index e9e35a4..b850318 100644
--- a/compiler/typecheck/TcCanonical.hs
+++ b/compiler/typecheck/TcCanonical.hs
@@ -948,7 +948,7 @@ canEqTyVar2 dflags ev eq_rel swapped tv1 xi2
   = rewriteEqEvidence ev eq_rel swapped xi1 xi2 co1 co2
     `andWhenContinue` \ new_ev ->
     case eq_rel of
-      NomEq  -> do { emitInsoluble (mkNonCanonical ev)
+      NomEq  -> do { emitInsoluble (mkNonCanonical new_ev)
               -- If we have a ~ [a], it is not canonical, and in particular
               -- we don't want to rewrite existing inerts with it, otherwise
               -- we'd risk divergence in the constraint solver



More information about the ghc-commits mailing list