Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Token definitions.
Synopsis
- data Tokens k e
- data Lit
- data Number
- data TkArray k e
- = TkItem (Tokens (TkArray k e) e)
- | TkArrayEnd k
- | TkArrayErr e
- data TkRecord k e
- = TkPair !Key (Tokens (TkRecord k e) e)
- | TkRecordEnd k
- | TkRecordErr e
Types
A well-formed JSON token stream.
Note: Lit
exists to make Tokens
have only 6 constructors.
This may or may not have impact on performance.
Since: 2.1.2.0
TkLit !Lit k | |
TkText !Text k | |
TkNumber !Number k | |
TkArrayOpen (TkArray k e) | |
TkRecordOpen (TkRecord k e) | |
TkErr e |
Instances
Bifoldable Tokens Source # | |
Bifunctor Tokens Source # | |
Bitraversable Tokens Source # | |
Defined in Data.Aeson.Decoding.Tokens bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Tokens a b -> f (Tokens c d) # | |
Foldable (Tokens k) Source # | |
Defined in Data.Aeson.Decoding.Tokens fold :: Monoid m => Tokens k m -> m # foldMap :: Monoid m => (a -> m) -> Tokens k a -> m # foldMap' :: Monoid m => (a -> m) -> Tokens k a -> m # foldr :: (a -> b -> b) -> b -> Tokens k a -> b # foldr' :: (a -> b -> b) -> b -> Tokens k a -> b # foldl :: (b -> a -> b) -> b -> Tokens k a -> b # foldl' :: (b -> a -> b) -> b -> Tokens k a -> b # foldr1 :: (a -> a -> a) -> Tokens k a -> a # foldl1 :: (a -> a -> a) -> Tokens k a -> a # elem :: Eq a => a -> Tokens k a -> Bool # maximum :: Ord a => Tokens k a -> a # minimum :: Ord a => Tokens k a -> a # | |
Traversable (Tokens k) Source # | |
Functor (Tokens k) Source # | |
(Show k, Show e) => Show (Tokens k e) Source # | |
(Eq k, Eq e) => Eq (Tokens k e) Source # | |
Literals. null
, true
, false
.
Numbers
We preserve whether the number was integral, decimal or in scientific form.
NumInteger !Integer | e.g. |
NumDecimal !Scientific | e.g. |
NumScientific !Scientific | e.g. |
Array tokens.
TkItem (Tokens (TkArray k e) e) | |
TkArrayEnd k | |
TkArrayErr e |
Instances
Bifoldable TkArray Source # | |
Bifunctor TkArray Source # | |
Bitraversable TkArray Source # | |
Defined in Data.Aeson.Decoding.Tokens bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> TkArray a b -> f (TkArray c d) # | |
Foldable (TkArray k) Source # | |
Defined in Data.Aeson.Decoding.Tokens fold :: Monoid m => TkArray k m -> m # foldMap :: Monoid m => (a -> m) -> TkArray k a -> m # foldMap' :: Monoid m => (a -> m) -> TkArray k a -> m # foldr :: (a -> b -> b) -> b -> TkArray k a -> b # foldr' :: (a -> b -> b) -> b -> TkArray k a -> b # foldl :: (b -> a -> b) -> b -> TkArray k a -> b # foldl' :: (b -> a -> b) -> b -> TkArray k a -> b # foldr1 :: (a -> a -> a) -> TkArray k a -> a # foldl1 :: (a -> a -> a) -> TkArray k a -> a # toList :: TkArray k a -> [a] # length :: TkArray k a -> Int # elem :: Eq a => a -> TkArray k a -> Bool # maximum :: Ord a => TkArray k a -> a # minimum :: Ord a => TkArray k a -> a # | |
Traversable (TkArray k) Source # | |
Defined in Data.Aeson.Decoding.Tokens | |
Functor (TkArray k) Source # | |
(Show k, Show e) => Show (TkArray k e) Source # | |
(Eq k, Eq e) => Eq (TkArray k e) Source # | |
Record tokens.
TkPair !Key (Tokens (TkRecord k e) e) | |
TkRecordEnd k | |
TkRecordErr e |