Unlike, say, deriving Eq , which infers the context for its instances by examining the definition of the data type, DeriveAnyClass infers its context by examining the type signatures of the class’s methods.