purescript-0.10.1: PureScript Programming Language Compiler

Safe HaskellSafe
LanguageHaskell98

Language.PureScript.AST.Literals

Description

The core functional representation for literal values.

Synopsis

Documentation

data Literal a Source #

Data type for literal values. Parameterised so it can be used for Exprs and Binders.

Constructors

NumericLiteral (Either Integer Double)

A numeric literal

StringLiteral String

A string literal

CharLiteral Char

A character literal

BooleanLiteral Bool

A boolean literal

ArrayLiteral [a]

An array literal

ObjectLiteral [(String, a)]

An object literal

Instances

Functor Literal Source # 

Methods

fmap :: (a -> b) -> Literal a -> Literal b #

(<$) :: a -> Literal b -> Literal a #

Eq a => Eq (Literal a) Source # 

Methods

(==) :: Literal a -> Literal a -> Bool #

(/=) :: Literal a -> Literal a -> Bool #

Ord a => Ord (Literal a) Source # 

Methods

compare :: Literal a -> Literal a -> Ordering #

(<) :: Literal a -> Literal a -> Bool #

(<=) :: Literal a -> Literal a -> Bool #

(>) :: Literal a -> Literal a -> Bool #

(>=) :: Literal a -> Literal a -> Bool #

max :: Literal a -> Literal a -> Literal a #

min :: Literal a -> Literal a -> Literal a #

Show a => Show (Literal a) Source # 

Methods

showsPrec :: Int -> Literal a -> ShowS #

show :: Literal a -> String #

showList :: [Literal a] -> ShowS #