module Language.PureScript.AST.Literals where
import Prelude
import Language.PureScript.PSString (PSString)
data Literal a
= NumericLiteral (Either Integer Double)
| StringLiteral PSString
| CharLiteral Char
| BooleanLiteral Bool
| ArrayLiteral [a]
| ObjectLiteral [(PSString, a)]
deriving (Literal a -> Literal a -> Bool
forall a. Eq a => Literal a -> Literal a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Literal a -> Literal a -> Bool
$c/= :: forall a. Eq a => Literal a -> Literal a -> Bool
== :: Literal a -> Literal a -> Bool
$c== :: forall a. Eq a => Literal a -> Literal a -> Bool
Eq, Literal a -> Literal a -> Ordering
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall {a}. Ord a => Eq (Literal a)
forall a. Ord a => Literal a -> Literal a -> Bool
forall a. Ord a => Literal a -> Literal a -> Ordering
forall a. Ord a => Literal a -> Literal a -> Literal a
min :: Literal a -> Literal a -> Literal a
$cmin :: forall a. Ord a => Literal a -> Literal a -> Literal a
max :: Literal a -> Literal a -> Literal a
$cmax :: forall a. Ord a => Literal a -> Literal a -> Literal a
>= :: Literal a -> Literal a -> Bool
$c>= :: forall a. Ord a => Literal a -> Literal a -> Bool
> :: Literal a -> Literal a -> Bool
$c> :: forall a. Ord a => Literal a -> Literal a -> Bool
<= :: Literal a -> Literal a -> Bool
$c<= :: forall a. Ord a => Literal a -> Literal a -> Bool
< :: Literal a -> Literal a -> Bool
$c< :: forall a. Ord a => Literal a -> Literal a -> Bool
compare :: Literal a -> Literal a -> Ordering
$ccompare :: forall a. Ord a => Literal a -> Literal a -> Ordering
Ord, Int -> Literal a -> ShowS
forall a. Show a => Int -> Literal a -> ShowS
forall a. Show a => [Literal a] -> ShowS
forall a. Show a => Literal a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Literal a] -> ShowS
$cshowList :: forall a. Show a => [Literal a] -> ShowS
show :: Literal a -> String
$cshow :: forall a. Show a => Literal a -> String
showsPrec :: Int -> Literal a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Literal a -> ShowS
Show, forall a b. a -> Literal b -> Literal a
forall a b. (a -> b) -> Literal a -> Literal b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: forall a b. a -> Literal b -> Literal a
$c<$ :: forall a b. a -> Literal b -> Literal a
fmap :: forall a b. (a -> b) -> Literal a -> Literal b
$cfmap :: forall a b. (a -> b) -> Literal a -> Literal b
Functor)