Fix egregious typo in checkTauTvUpdate.
authorRichard Eisenberg <eir@cis.upenn.edu>
Wed, 11 Feb 2015 18:13:53 +0000 (13:13 -0500)
committerRichard Eisenberg <eir@cis.upenn.edu>
Wed, 11 Feb 2015 18:41:10 +0000 (13:41 -0500)
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.

compiler/typecheck/TcUnify.hs

index 93f3f11..024d443 100644 (file)
@@ -979,7 +979,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