Safe Haskell | Safe-Infered |
---|
Algebraic data type definitions.
- data DataDef n = DataDef {
- dataDefTypeName :: n
- dataDefParamKinds :: [Kind n]
- dataDefCtors :: Maybe [(n, [Type n])]
- data DataDefs n = DataDefs {
- dataDefsTypes :: Map n (DataType n)
- dataDefsCtors :: Map n (DataCtor n)
- data DataMode n
- = DataModeSmall [n]
- | DataModeLarge
- data DataType n = DataType {
- dataTypeName :: n
- dataTypeParamKinds :: [Kind n]
- dataTypeMode :: DataMode n
- data DataCtor n = DataCtor {
- dataCtorName :: n
- dataCtorFieldTypes :: [Type n]
- dataCtorTypeName :: n
- emptyDataDefs :: DataDefs n
- insertDataDef :: Ord n => DataDef n -> DataDefs n -> DataDefs n
- fromListDataDefs :: Ord n => [DataDef n] -> DataDefs n
- lookupModeOfDataType :: Ord n => n -> DataDefs n -> Maybe (DataMode n)
Documentation
The definition of a single data type.
DataDef | |
|
Data type definition table
A table of data type definitions, unpacked into type and data constructors so we can find them easily.
DataDefs | |
|
The mode of a data type records how many data constructors there are.
This can be set to Large
for large primitive types like Int and Float.
In this case we don't ever expect them all to be enumerated
as case alternatives.
Describes a data type constructor, used in the DataDefs
table.
DataType | |
|
Describes a data constructor, used in the DataDefs
table.
DataCtor | |
|
emptyDataDefs :: DataDefs nSource
An empty table of data type definitions.
insertDataDef :: Ord n => DataDef n -> DataDefs n -> DataDefs nSource
Insert a data type definition into some DataDefs.
fromListDataDefs :: Ord n => [DataDef n] -> DataDefs nSource