- = case lookupVarEnv subst tv1' of
- Nothing -- No existing binding
- | any (inRnEnvR rn_env) (varSetElems (tyVarsOfType ty2))
- -> Nothing -- Occurs check
- | otherwise
- -> do { subst1 <- match_kind menv subst tv1 ty2
- ; return (extendVarEnv subst1 tv1' ty2) }
+ = if any (inRnEnvR rn_env) (varSetElems (tyVarsOfType ty2))
+ then Nothing -- Occurs check
+ else do { subst1 <- match_kind menv subst tv1 ty2