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

Can’t coerce inside of implicit parameters
## Summary ```haskell {-# LANGUAGE ImplicitParams #-} {-# LANGUAGE ImpredicativeTypes #-} module Test where import Data.Coerce newtype Foo = MkFoo Int a :: (Foo -> Int) -> (Int -> Int) a = coerce b :: ((?foo :: Foo) => Int) -> ((?foo :: Int) => Int) b = coerce @(((?foo :: Foo) => Int)) @(((?foo :: Int) => Int)) ``` `a` typechecks, but `b` does not. This prevents `DerivingVia` for classes whose methods have implicit parameters whose types depend on the instance. ## Expected behavior `b` typechecks ## Environment * GHC version used: 9.10.2
issue