GHC 9.10 introduces the ability to use invisible type patterns. As such, examples like this can now be written:
id :: a -> a
id @t x = x :: t
The question is: can we promote and single these definitions? It seems plausible, given that we can write the following:
type Id :: a -> a
type family Id x where
Id @t x = x :: t
sId :: (forall (x :: a). Sing x -> Sing (Id x) :: Type)
sId @t (sX :: Sing x) = sX :: Sing (x :: t)
We should see if this is doable. See also #565.