elm-street-0.1.0.0: Crossing the road between Haskell and Elm

Safe HaskellNone
LanguageHaskell2010

Elm.Ast

Description

AST representing structure of Elm types. Haskell generic representation is converted to this AST which later is going to be pretty-printed.

Synopsis

Documentation

data ElmDefinition Source #

Elm data type definition.

Instances
Show ElmDefinition Source # 
Instance details

Defined in Elm.Ast

data ElmAlias Source #

AST for type alias in Elm.

Constructors

ElmAlias 

Fields

Instances
Show ElmAlias Source # 
Instance details

Defined in Elm.Ast

data ElmType Source #

AST for type in Elm.

Constructors

ElmType 

Fields

Instances
Show ElmType Source # 
Instance details

Defined in Elm.Ast

data ElmPrim Source #

Primitive elm types; hardcoded by the language.

Constructors

ElmUnit

() type in elm

ElmNever

Never type in elm, analogous to Void in Haskell

ElmBool
Bool
ElmChar
Char
ElmInt
Int
ElmFloat
Float
ElmString
String
ElmTime

Posix in elm, UTCTime in Haskell

ElmMaybe !TypeRef
Maybe T
ElmResult !TypeRef !TypeRef

Result A B in elm

ElmPair !TypeRef !TypeRef

(A, B) in elm

ElmTriple !TypeRef !TypeRef !TypeRef

(A, B, C) in elm

ElmList !TypeRef

List A in elm

Instances
Show ElmPrim Source # 
Instance details

Defined in Elm.Ast

data ElmRecordField Source #

Single file of type alias.

Instances
Show ElmRecordField Source # 
Instance details

Defined in Elm.Ast

data ElmConstructor Source #

Constructor of type.

Constructors

ElmConstructor 

Fields

Instances
Show ElmConstructor Source # 
Instance details

Defined in Elm.Ast

isEnum :: ElmType -> Bool Source #

Checks if the given ElmType is Enum.

getConstructorNames :: ElmType -> [Text] Source #

Gets the list of the constructor names.

newtype TypeName Source #

Wrapper for name of the type.

Constructors

TypeName 

Fields

Instances
Show TypeName Source # 
Instance details

Defined in Elm.Ast

data TypeRef Source #

Reference to another existing type.

Instances
Show TypeRef Source # 
Instance details

Defined in Elm.Ast

definitionToRef :: ElmDefinition -> TypeRef Source #

Extracts reference to the existing data type type from some other type elm defintion.