product package:ghc

Extract the type constructor, type argument, data constructor and it's representation argument types from a type if it is a product type. Precisely, we return Just for any data type that is all of:
  • Concrete (i.e. constructors visible)
  • Single-constructor
  • ... which has no existentials
Whether the type is a data type or a newtype.
We couldn't derive an instance either because the type was not an enum type or because it did have more than one constructor.