ghc-8.4.4: 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 Source #

Describes the representation type of a data constructor field.

Constructors

Keep Type CoreExpr 
Wrap Type 
Instances
Outputable CompRepr # 
Instance details

Defined in Vectorise.Generic.Description

data ProdRepr Source #

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
Outputable ProdRepr # 
Instance details

Defined in Vectorise.Generic.Description

data ConRepr Source #

Describes the representation type of a data constructor.

Constructors

ConRepr 
Instances
Outputable ConRepr # 
Instance details

Defined in Vectorise.Generic.Description

data SumRepr Source #

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
Outputable SumRepr # 
Instance details

Defined in Vectorise.Generic.Description

tyConRepr :: TyCon -> VM SumRepr Source #

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

sumReprType :: SumRepr -> VM Type Source #

Yield the type of this sum representation.

compOrigType :: CompRepr -> Type Source #

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