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
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
Record tokens.
TkPair !Key (Tokens (TkRecord k e) e) | |
TkRecordEnd k | |
TkRecordErr e |