[commit: ghc] ghc-7.10: Fix egregious typo in checkTauTvUpdate. (9970626)
git at git.haskell.org
git at git.haskell.org
Thu Feb 12 16:15:00 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.10
Link : http://ghc.haskell.org/trac/ghc/changeset/9970626658b427df5e189a97496d89df76043e47/ghc
>---------------------------------------------------------------
commit 9970626658b427df5e189a97496d89df76043e47
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date: Wed Feb 11 13:13:53 2015 -0500
Fix egregious typo in checkTauTvUpdate.
The old code used an unzonked type in an occurs-check, which
would sometimes lead to an infinite loop.
Please merge to ghc-7.10.
(cherry picked from commit d5cd94d7b57dc233ff40bb3e494b7baf1be4d285)
>---------------------------------------------------------------
9970626658b427df5e189a97496d89df76043e47
compiler/typecheck/TcUnify.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler/typecheck/TcUnify.hs b/compiler/typecheck/TcUnify.hs
index 5d8ef5d..251cfbf 100644
--- a/compiler/typecheck/TcUnify.hs
+++ b/compiler/typecheck/TcUnify.hs
@@ -987,7 +987,7 @@ checkTauTvUpdate dflags tv ty
; case sub_k of
Nothing -> return Nothing
Just LT -> return Nothing
- _ | is_return_tv -> if tv `elemVarSet` tyVarsOfType ty
+ _ | is_return_tv -> if tv `elemVarSet` tyVarsOfType ty1
then return Nothing
else return (Just ty1)
_ | defer_me ty1 -- Quick test
More information about the ghc-commits
mailing list