elm-street-0.2.2.1: Crossing the road between Haskell and Elm
Safe HaskellSafe-Inferred
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

Instances details
Show ElmDefinition Source # 
Instance details

Defined in Elm.Ast

data ElmRecord Source #

AST for record type alias in Elm.

Constructors

ElmRecord 

Fields

Instances

Instances details
Show ElmRecord Source # 
Instance details

Defined in Elm.Ast

data ElmType Source #

AST for type in Elm.

Constructors

ElmType 

Fields

Instances

Instances details
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

ElmValue

Json.Encode.Value in elm, Data.Aeson.Value 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

ElmNonEmptyPair !TypeRef

NonEmpty A represented by (A, List A) in elm

Instances

Instances details
Show ElmPrim Source # 
Instance details

Defined in Elm.Ast

data ElmRecordField Source #

Single field of record type alias.

Instances

Instances details
Show ElmRecordField Source # 
Instance details

Defined in Elm.Ast

data ElmConstructor Source #

Constructor of type.

Constructors

ElmConstructor 

Fields

Instances

Instances details
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

Instances details
Show TypeName Source # 
Instance details

Defined in Elm.Ast

data TypeRef Source #

Reference to another existing type.

Instances

Instances details
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.