Zubin pushed to branch wip/25924 at Glasgow Haskell Compiler / GHC
Commits:
-
7959f563
by Zubin Duggal at 2026-06-30T18:26:12+05:30
2 changed files:
Changes:
| ... | ... | @@ -66,7 +66,7 @@ import GHC.Types.Unique.Supply |
| 66 | 66 | import GHC.Core
|
| 67 | 67 | import GHC.Core.Utils ( exprType, mkSingleAltCase, bindNonRec, mkCast, mkTick )
|
| 68 | 68 | import GHC.Core.Type
|
| 69 | -import GHC.Core.Predicate ( scopedSort, isPredTy )
|
|
| 69 | +import GHC.Core.Predicate ( scopedSort, isEqPred )
|
|
| 70 | 70 | import GHC.Core.TyCo.Compare ( eqType )
|
| 71 | 71 | import GHC.Core.Coercion ( isCoVar, mkRepReflCo, mkForAllVisCos )
|
| 72 | 72 | import GHC.Core.DataCon ( DataCon, dataConWorkId, dataConWrapId )
|
| ... | ... | @@ -234,8 +234,11 @@ mkLitRubbish :: Type -> Maybe CoreExpr |
| 234 | 234 | mkLitRubbish ty
|
| 235 | 235 | | not (noFreeVarsOfType rep)
|
| 236 | 236 | = Nothing -- Satisfy INVARIANT 1
|
| 237 | - | isPredTy ty
|
|
| 237 | + | isEqPred ty
|
|
| 238 | 238 | = Nothing -- Satisfy INVARIANT 2
|
| 239 | + | isTerminatingType ty
|
|
| 240 | + = Nothing -- Don't make a rubbish dictionary record (#25924).
|
|
| 241 | + -- See Note [Don't make fillers for predicates] in GHC.Core.Opt.WorkWrap.Utils
|
|
| 239 | 242 | | otherwise
|
| 240 | 243 | = Just (Lit (LitRubbish torc rep) `mkTyApps` [ty])
|
| 241 | 244 | where
|
| ... | ... | @@ -30,7 +30,6 @@ import GHC.Core.Subst |
| 30 | 30 | import GHC.Core.Type
|
| 31 | 31 | import GHC.Core.Multiplicity
|
| 32 | 32 | import GHC.Core.Coercion
|
| 33 | -import GHC.Core.Predicate( isPredTy )
|
|
| 34 | 33 | import GHC.Core.Reduction
|
| 35 | 34 | import GHC.Core.FamInstEnv
|
| 36 | 35 | import GHC.Core.Predicate( isEqualityClass )
|
| ... | ... | @@ -1074,7 +1073,7 @@ mkAbsentFiller opts arg str |
| 1074 | 1073 | -- if we are wrong (like we were in #11126). Otherwise we fall through to the
|
| 1075 | 1074 | -- less-desirable mkLitRubbish case.
|
| 1076 | 1075 | | mightBeLiftedType arg_ty
|
| 1077 | - , not (isPredTy arg_ty) -- See (AF4) in Note [Absent fillers]
|
|
| 1076 | + , not (isTerminatingType arg_ty) -- See (AF4) in Note [Absent fillers]
|
|
| 1078 | 1077 | , not (isStrictDmd (idDemandInfo arg)) -- See (AF2)
|
| 1079 | 1078 | , not (isMarkedStrict str) -- in Note [Absent fillers]
|
| 1080 | 1079 | = Just (mkAbsentErrorApp arg_ty msg)
|