Zubin pushed to branch wip/25924 at Glasgow Haskell Compiler / GHC Commits: 7959f563 by Zubin Duggal at 2026-06-30T18:26:12+05:30 Use isTerminatingType instead of isPredTy - - - - - 2 changed files: - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs Changes: ===================================== compiler/GHC/Core/Make.hs ===================================== @@ -66,7 +66,7 @@ import GHC.Types.Unique.Supply import GHC.Core import GHC.Core.Utils ( exprType, mkSingleAltCase, bindNonRec, mkCast, mkTick ) import GHC.Core.Type -import GHC.Core.Predicate ( scopedSort, isPredTy ) +import GHC.Core.Predicate ( scopedSort, isEqPred ) import GHC.Core.TyCo.Compare ( eqType ) import GHC.Core.Coercion ( isCoVar, mkRepReflCo, mkForAllVisCos ) import GHC.Core.DataCon ( DataCon, dataConWorkId, dataConWrapId ) @@ -234,8 +234,11 @@ mkLitRubbish :: Type -> Maybe CoreExpr mkLitRubbish ty | not (noFreeVarsOfType rep) = Nothing -- Satisfy INVARIANT 1 - | isPredTy ty + | isEqPred ty = Nothing -- Satisfy INVARIANT 2 + | isTerminatingType ty + = Nothing -- Don't make a rubbish dictionary record (#25924). + -- See Note [Don't make fillers for predicates] in GHC.Core.Opt.WorkWrap.Utils | otherwise = Just (Lit (LitRubbish torc rep) `mkTyApps` [ty]) where ===================================== compiler/GHC/Core/Opt/WorkWrap/Utils.hs ===================================== @@ -30,7 +30,6 @@ import GHC.Core.Subst import GHC.Core.Type import GHC.Core.Multiplicity import GHC.Core.Coercion -import GHC.Core.Predicate( isPredTy ) import GHC.Core.Reduction import GHC.Core.FamInstEnv import GHC.Core.Predicate( isEqualityClass ) @@ -1074,7 +1073,7 @@ mkAbsentFiller opts arg str -- if we are wrong (like we were in #11126). Otherwise we fall through to the -- less-desirable mkLitRubbish case. | mightBeLiftedType arg_ty - , not (isPredTy arg_ty) -- See (AF4) in Note [Absent fillers] + , not (isTerminatingType arg_ty) -- See (AF4) in Note [Absent fillers] , not (isStrictDmd (idDemandInfo arg)) -- See (AF2) , not (isMarkedStrict str) -- in Note [Absent fillers] = Just (mkAbsentErrorApp arg_ty msg) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7959f563ffc6a0e12dfbe4d59b37b372... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7959f563ffc6a0e12dfbe4d59b37b372... You're receiving this email because of your account on gitlab.haskell.org.