language-elm-0.1.0.3: Generate elm code

Safe HaskellSafe
LanguageHaskell2010

Elm.Expression

Description

Used to declare expressions

Synopsis

Documentation

data Expr Source #

The expression type

Constructors

Bool Bool

A boolean literal

Str String

A string literal

Int Int

An integer literal

Float Float

A float literal

Under

An underscore variable placeholder

Var String

A variable

App [Expr]

Function application, the tail is applied to the head

List [Expr]

A list of expressions

Op String Expr Expr

Apply an inline operator to two expressions

Tuple [Expr]

A tuple of expressions

Record (Maybe Expr) [(String, Expr)]

A record, the first paramater is an optional record to update from

Let Expr [(Expr, Expr)]

A let expression

Case Expr [(Expr, Expr)]

A case expression

Parens Expr

Wrap an expression in parens, should be mostly automatic

Instances

IsString Expr Source #

Allows creating variables with overloaded strings

Methods

fromString :: String -> Expr #

Generate Expr Source #