ghc-8.2.2: The GHC API

Safe HaskellNone
LanguageHaskell2010

Vectorise.Generic.Description

Description

Compute a description of the generic representation that we use for a user defined data type.

During vectorisation, we generate a PRepr and PA instance for each user defined data type. The PA dictionary contains methods to convert the user type to and from our generic representation. This module computes a description of what that generic representation is.

Synopsis

Documentation

data CompRepr #

Describes the representation type of a data constructor field.

Constructors

Keep Type CoreExpr 
Wrap Type 

Instances

data ProdRepr #

Describes the representation type of the fields / components of a constructor. If the data constructor has multiple fields then we bundle them together into a generic product type.

Constructors

EmptyProd

Data constructor has no fields.

UnaryProd CompRepr

Data constructor has a single field.

Prod

Data constructor has several fields.

Fields

Instances

data ConRepr #

Describes the representation type of a data constructor.

Constructors

ConRepr 

Instances

data SumRepr #

Describes the generic representation of a data type. If the data type has multiple constructors then we bundle them together into a generic sum type.

Constructors

EmptySum

Data type has no data constructors.

UnarySum ConRepr

Data type has a single constructor.

Sum

Data type has multiple constructors.

Fields

Instances

tyConRepr :: TyCon -> VM SumRepr #

Determine the generic representation of a data type, given its tycon.

sumReprType :: SumRepr -> VM Type #

Yield the type of this sum representation.

compOrigType :: CompRepr -> Type #

Yield the original component type of a data constructor component representation.