Error GHC-91510: illegal polymorphic type
Haskell Community [Unofficial]
June 23, 2026
Mmm, indeed—the change to type Objects c :: k -> Constraint seems to be necessary for GHC 9.14 to handle the quantified constraint, though I don’t really know why.
Unrelatedly, you lost the precondition on type Objects (Transform c d); CCompose (Objects d) is too strong. Call me crazy, but how about:
class (Category c, Category d, Objects c ==> ObjectClass d . f)
=> Functor c d f where
map :: a `c` b -> f a `d` f b
instance Category (Transform c d) where
type Objects (Transform c d) = Functor c d
...
Discussion in the ATmosphere