purescript-0.13.8: PureScript Programming Language Compiler

Safe HaskellNone



Data types for the imperative core AST



data AST Source #

Data type for simplified JavaScript expressions


NumericLiteral (Maybe SourceSpan) (Either Integer Double)

A numeric literal

StringLiteral (Maybe SourceSpan) PSString

A string literal

BooleanLiteral (Maybe SourceSpan) Bool

A boolean literal

Unary (Maybe SourceSpan) UnaryOperator AST

A unary operator application

Binary (Maybe SourceSpan) BinaryOperator AST AST

A binary operator application

ArrayLiteral (Maybe SourceSpan) [AST]

An array literal

Indexer (Maybe SourceSpan) AST AST

An array indexer expression

ObjectLiteral (Maybe SourceSpan) [(PSString, AST)]

An object literal

Function (Maybe SourceSpan) (Maybe Text) [Text] AST

A function introduction (optional name, arguments, body)

App (Maybe SourceSpan) AST [AST]

Function application

Var (Maybe SourceSpan) Text


Block (Maybe SourceSpan) [AST]

A block of expressions in braces

VariableIntroduction (Maybe SourceSpan) Text (Maybe AST)

A variable introduction and optional initialization

Assignment (Maybe SourceSpan) AST AST

A variable assignment

While (Maybe SourceSpan) AST AST

While loop

For (Maybe SourceSpan) Text AST AST AST

For loop

ForIn (Maybe SourceSpan) Text AST AST

ForIn loop

IfElse (Maybe SourceSpan) AST AST (Maybe AST)

If-then-else statement

Return (Maybe SourceSpan) AST

Return statement

ReturnNoResult (Maybe SourceSpan)

Return statement with no return value

Throw (Maybe SourceSpan) AST

Throw statement

InstanceOf (Maybe SourceSpan) AST AST

instanceof check

Comment (Maybe SourceSpan) [Comment] AST

Commented JavaScript

Eq AST Source # 
Instance details

Defined in Language.PureScript.CoreImp.AST


(==) :: AST -> AST -> Bool #

(/=) :: AST -> AST -> Bool #

Show AST Source # 
Instance details

Defined in Language.PureScript.CoreImp.AST


showsPrec :: Int -> AST -> ShowS #

show :: AST -> String #

showList :: [AST] -> ShowS #

everywhere :: (AST -> AST) -> AST -> AST Source #

everywhereTopDownM :: Monad m => (AST -> m AST) -> AST -> m AST Source #

everything :: (r -> r -> r) -> (AST -> r) -> AST -> r Source #