Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines how the derived Haskell data types are represented. - It is useful for writing type conversion rules.
- data ETypeDef
- data EType
- data ETCon = ETCon {}
- data ETVar = ETVar {}
- data ETypeName = ETypeName {}
- data EPrimAlias = EPrimAlias {}
- data EAlias = EAlias {
- ea_name :: ETypeName
- ea_fields :: [(String, EType)]
- ea_omit_null :: Bool
- ea_newtype :: Bool
- data ESum = ESum {
- es_name :: ETypeName
- es_options :: [(String, Either [(String, EType)] [EType])]
- es_type :: SumEncoding'
- es_omit_null :: Bool
- es_unary_strings :: Bool
- unpackTupleType :: EType -> [EType]
- unpackToplevelConstr :: EType -> [EType]
- class IsElmDefinition a where
- compileElmDef :: Proxy a -> ETypeDef
- newtype SumEncoding' = SumEncoding' SumEncoding
- defSumEncoding :: SumEncoding'
Documentation
Type definition, including constructors.
Type construction : type variables, type constructors, tuples and type application.
Type constructor:
ETCon "Int"
Type variable:
ETVar "a"
Type name:
ETypeName "Map" [ETVar "k", ETVar "v"]
EAlias | |
|
ESum | |
|
unpackTupleType :: EType -> [EType] Source
Transforms tuple types in a list of types. Otherwise returns a singleton list with the original type.
unpackToplevelConstr :: EType -> [EType] Source
class IsElmDefinition a where Source
compileElmDef :: Proxy a -> ETypeDef Source
newtype SumEncoding' Source