[commit: ghc] typeable-with-kinds: Always use a fresh wanted variable, as otherwise we could get into loops. (e63a277)

git at git.haskell.org git at git.haskell.org
Fri Mar 6 19:33:37 UTC 2015


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

On branch  : typeable-with-kinds
Link       : http://ghc.haskell.org/trac/ghc/changeset/e63a277d2b1bfd01e5a53566f8f72a13ad7c0f86/ghc

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

commit e63a277d2b1bfd01e5a53566f8f72a13ad7c0f86
Author: Iavor S. Diatchki <diatchki at galois.com>
Date:   Fri Mar 6 11:33:31 2015 -0800

    Always use a fresh wanted variable, as otherwise we could get into loops.


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

e63a277d2b1bfd01e5a53566f8f72a13ad7c0f86
 compiler/typecheck/TcInteract.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs
index 53ef0e6..11c917d 100644
--- a/compiler/typecheck/TcInteract.hs
+++ b/compiler/typecheck/TcInteract.hs
@@ -1836,7 +1836,7 @@ matchTypeableClass clas k t loc
 
   -- Emit a `Typeable` constraint for the given type.
   subGoal ty = do let goal = mkClassPred clas [ typeKind ty, ty ]
-                  (ev,_) <- newWantedEvVar loc goal
+                  ev <- newWantedEvVarNC loc goal
                   return ev
 
 



More information about the ghc-commits mailing list