Simon Peyton Jones pushed to branch wip/T26543b at Glasgow Haskell Compiler / GHC Commits: fd273d9e by Simon Peyton Jones at 2026-09-02T23:17:05+01:00 wibble - - - - - 1 changed file: - compiler/GHC/Tc/Utils/Unify.hs Changes: ===================================== compiler/GHC/Tc/Utils/Unify.hs ===================================== @@ -3651,6 +3651,7 @@ simpleUnifyCheck caller given_eq_lvl lhs_tv rhs lhs_info = metaTyVarInfo lhs_tv lhs_tv_lvl = tcTyVarLevel lhs_tv lhs_tv_is_concrete = isConcreteTyVar lhs_tv + lhs_tv_nm = tyVarName lhs_tv forall_ok = case caller of UC_QuickLook -> isQLInstTyVar lhs_tv @@ -3670,7 +3671,7 @@ simpleUnifyCheck caller given_eq_lvl lhs_tv rhs -- c.f. checkTyVar, the TEFTyVar case | tcTyVarLevel tv `strictlyDeeperThan` lhs_tv_lvl = False | lhs_tv_is_concrete, not (isConcreteTyVar tv) = False - | simple_occurs_check lhs_tv tv = False + | simple_occurs_check lhs_tv_nm tv = False | otherwise = True rhs_is_ok (FunTy {ft_af = af, ft_mult = w, ft_arg = a, ft_res = r}) @@ -4725,12 +4726,12 @@ simpleOccursCheck (OC_Check lhs_tv occ_prob) occ_tv | simple_occurs_check lhs_tv occ_tv = TyVarCheck_Error (cteProblem occ_prob) | otherwise = TyVarCheck_Success -simple_occurs_check :: TcTyVar -> TcTyVar -> Bool -- True <=> occurs check +simple_occurs_check :: Name -> TcTyVar -> Bool -- True <=> occurs check -- Check for an occurrence of lhs_tv in occ_tv or its kind simple_occurs_check lhs_tv occ_tv - | lhs_tv == tyVarName occ_tcv = True - | anyFreeVarsOfType check_fv (tyVarKind occ_tcv) = True - | otherwise = False + | lhs_tv == tyVarName occ_tv = True + | anyFreeVarsOfType (simple_occurs_check lhs_tv) (tyVarKind occ_tv) = True + | otherwise = False ------------------------- tyVarLevelCheck :: LevelCheck m -> TcTyVar -> TyVarCheckResult m View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fd273d9e52242796f1d1277b8d85820d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fd273d9e52242796f1d1277b8d85820d... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Simon Peyton Jones (@simonpj)