Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

TypeRep equality false negative for function types
## Summary There are, it would seem, multiple unequal `TypeRep` representations of the same function type. ## Steps to reproduce ```hs {-# LANGUAGE GHC2024 #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE UndecidableInstances #-} import Data.Kind (Constraint) import Data.Proxy import Data.Typeable type Reassemble :: k -> k -> Constraint class Reassemble a b | a -> b instance {-# OVERLAPPABLE #-} a ~ a' => Reassemble a a' instance (Reassemble f f', Reassemble a a', fa ~ f' a') => Reassemble (f a) fa test :: forall a b. (Typeable a, Typeable b, Reassemble a b) => Proxy a -> String test pa | typeRep pa == typeRep pb = "Equal!\n" | otherwise = "Not equal:\n" <> show (typeRep pa) <> "\n" <> show (typeRep pb) <> "\n" where pb = Proxy @b main :: IO () main = do putStrLn $ test (Proxy @([(Bool, [Int])])) -- Equal! putStrLn $ test (Proxy @(Bool -> Int)) -- Not equal: -- Bool -> Int -- FUN 'Many ('BoxedRep 'Lifted) ('BoxedRep 'Lifted) Bool Int ``` ## Expected behavior Both should be equal. (Oddly enough, they are if the `Reassemble a b` constraint is moved to the front of the `test` context!) ## Environment * GHC version used: 9.12.2
issue