Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
AST representing structure of Elm types. Haskell generic representation is converted to this AST which later is going to be pretty-printed.
Synopsis
- data ElmDefinition
- data ElmRecord = ElmRecord {}
- data ElmType = ElmType {
- elmTypeName :: !Text
- elmTypeVars :: ![Text]
- elmTypeIsNewtype :: !Bool
- elmTypeConstructors :: !(NonEmpty ElmConstructor)
- data ElmPrim
- data ElmRecordField = ElmRecordField {}
- data ElmConstructor = ElmConstructor {}
- isEnum :: ElmType -> Bool
- getConstructorNames :: ElmType -> [Text]
- newtype TypeName = TypeName {
- unTypeName :: Text
- data TypeRef
- definitionToRef :: ElmDefinition -> TypeRef
Documentation
data ElmDefinition Source #
Elm data type definition.
Instances
Show ElmDefinition Source # | |
Defined in Elm.Ast showsPrec :: Int -> ElmDefinition -> ShowS # show :: ElmDefinition -> String # showList :: [ElmDefinition] -> ShowS # |
AST for record type alias
in Elm.
ElmRecord | |
|
AST for type
in Elm.
ElmType | |
|
Primitive elm types; hardcoded by the language.
ElmUnit |
|
ElmNever |
|
ElmBool | Bool |
ElmChar | Char |
ElmInt | Int |
ElmFloat | Float |
ElmString | String |
ElmTime |
|
ElmValue |
|
ElmMaybe !TypeRef | Maybe T |
ElmResult !TypeRef !TypeRef |
|
ElmPair !TypeRef !TypeRef |
|
ElmTriple !TypeRef !TypeRef !TypeRef |
|
ElmList !TypeRef |
|
ElmNonEmptyPair !TypeRef |
|
data ElmRecordField Source #
Single field of record type alias
.
Instances
Show ElmRecordField Source # | |
Defined in Elm.Ast showsPrec :: Int -> ElmRecordField -> ShowS # show :: ElmRecordField -> String # showList :: [ElmRecordField] -> ShowS # |
data ElmConstructor Source #
Constructor of type
.
ElmConstructor | |
|
Instances
Show ElmConstructor Source # | |
Defined in Elm.Ast showsPrec :: Int -> ElmConstructor -> ShowS # show :: ElmConstructor -> String # showList :: [ElmConstructor] -> ShowS # |
getConstructorNames :: ElmType -> [Text] Source #
Gets the list of the constructor names.
Wrapper for name of the type.
Reference to another existing type.
definitionToRef :: ElmDefinition -> TypeRef Source #
Extracts reference to the existing data type type from some other type elm defintion.