ghc-7.7.20130829: The GHC API

Safe HaskellNone

DsCCall

Synopsis

Documentation

splitDataProductType_maybeSource

Arguments

:: Type

A product type, perhaps

-> Maybe (TyCon, [Type], DataCon, [Type]) 

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 type that is all of:

  • Concrete (i.e. constructors visible)
  • Single-constructor
  • Not existentially quantified

Whether the type is a data type or a newtype