Adam Gundry pushed to branch wip/amg/castz at Glasgow Haskell Compiler / GHC Commits: 378a1396 by Adam Gundry at 2025-07-24T08:12:04+01:00 Attempt to improve T5030 by zapping in ds_hs_wrapper - - - - - 1 changed file: - compiler/GHC/HsToCore/Binds.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -58,6 +58,7 @@ import GHC.Core.Type import GHC.Core.Coercion import GHC.Core.Rules import GHC.Core.TyCo.Compare( eqType ) +import GHC.Core.TyCo.FVs import GHC.Builtin.Names import GHC.Builtin.Types ( naturalTy, typeSymbolKind, charTy ) @@ -1666,7 +1667,8 @@ ds_hs_wrapper wrap = go wrap go (WpEvLam ev) k = k $ Lam ev go (WpTyLam tv) k = k $ Lam tv go (WpCast co) k = assert (coercionRole co == Representational) $ - k $ \e -> mkCastDs e co + k $ \e -> -- AMG TODO: clean this up if it helps T5030 + if isReflCo co then e else mkCastZ e (exprType e) (shallowCoVarsOfCo co) go (WpEvApp tm) k = do { core_tm <- dsEvTerm tm ; k $ \e -> e `App` core_tm } go (WpLet ev_binds) k = dsTcEvBinds ev_binds $ \bs -> View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/378a1396d87f8e464301d6eb0594b8c0... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/378a1396d87f8e464301d6eb0594b8c0... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Adam Gundry (@adamgundry)