Simon Peyton Jones pushed to branch wip/T27828 at Glasgow Haskell Compiler / GHC Commits: 5ce02260 by Simon Peyton Jones at 2026-09-25T09:42:02+01:00 Wibbles - - - - - 2 changed files: - compiler/GHC/Core/FamInstEnv.hs - + testsuite/tests/indexed-types/should_compile/T27828a.hs Changes: ===================================== compiler/GHC/Core/FamInstEnv.hs ===================================== @@ -604,8 +604,8 @@ data BranchCompatibility | BC_Incompat -- LHSs unify with S, and S(rhs1)/=S(rhs2) compareBranches :: CoAxBranch -> CoAxBranch -> BranchCompatibility -compareBranches b1@(CoAxBranch { cab_lhs = lhs1, cab_rhs = rhs1 }) - b2@(CoAxBranch { cab_lhs = lhs2, cab_rhs = rhs2 }) +compareBranches (CoAxBranch { cab_lhs = lhs1, cab_rhs = rhs1 }) + (CoAxBranch { cab_lhs = lhs2, cab_rhs = rhs2 }) = case tcUnifyTysFG alwaysBindFam alwaysBindTv commonlhs1 commonlhs2 of -- Here we need the cab_tvs of the two branches to be disinct. -- See Note [CoAxBranch type variables] in GHC.Core.Coercion.Axiom. ===================================== testsuite/tests/indexed-types/should_compile/T27828a.hs ===================================== @@ -0,0 +1,16 @@ +{-# LANGUAGE TypeFamilies #-} + +module T27828a where + +import Data.Proxy + +type family F a where + F Int = Int -- B1 + F Char = Bool -- B2 + F a = a -- B3 + +h :: (F a ~ Int) => Proxy a -> () +h = error "urk" + +k :: () +k = h Proxy -- [W] F alpha ~ Int View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5ce02260ed21bba53c07ac5b242b8a2d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5ce02260ed21bba53c07ac5b242b8a2d... 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)