Visible dependent quantification permitted in standalone deriving declarations
GHC 8.10.1 and later incorrectly allow VDQ in the type of a standalone deriving declaration:
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE StandaloneDeriving #-}
module Bug where
class C a
deriving instance forall a -> C (Maybe a)
Note that this only applies to standalone-derived instances. If you remove the deriving part of the last line, then GHC will reject it as expected.