purescript-0.15.12: PureScript Programming Language Compiler

Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.PureScript.AST.Literals

Description

The core functional representation for literal values.

Synopsis

- data Literal a
  - = NumericLiteral (Either Integer Double)
  - | StringLiteral PSString
  - | CharLiteral Char
  - | BooleanLiteral Bool
  - | ArrayLiteral [a]
  - | ObjectLiteral [(PSString, a)]

# Documentation

data Literal a #

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

Constructors

NumericLiteral (Either Integer Double) | A numeric literal
StringLiteral PSString | A string literal
CharLiteral Char | A character literal
BooleanLiteral Bool | A boolean literal
ArrayLiteral [a] | An array literal
ObjectLiteral [(PSString, a)] | An object literal

#### Instances

Instances details

Functor Literal # |
Instance details Defined in Language.PureScript.AST.Literals Methods fmap :: (a -> b) -> Literal a -> Literal b # (<$) :: a -> Literal b -> Literal a #
Show a => Show (Literal a) # |
Instance details Defined in Language.PureScript.AST.Literals Methods showsPrec :: Int -> Literal a -> ShowS # show :: Literal a -> String # showList :: [Literal a] -> ShowS #
Eq a => Eq (Literal a) # |
Instance details Defined in Language.PureScript.AST.Literals Methods (==) :: Literal a -> Literal a -> Bool # (/=) :: Literal a -> Literal a -> Bool #
Ord a => Ord (Literal a) # |
Instance details Defined in Language.PureScript.AST.Literals 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 #