Copyright | (c) Eric Mertens 2023 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Toml.Parser.Types
Description
This module provides a raw representation of TOML files as a list of table definitions and key-value assignments.
These values use the raw dotted keys and have no detection for overlapping assignments.
Further processing will happen in the Semantics module.
Synopsis
- type Key = NonEmpty (Located String)
- data Expr
- data Val
- = ValInteger Integer
- | ValFloat Double
- | ValArray [Val]
- | ValTable [(Key, Val)]
- | ValBool Bool
- | ValString String
- | ValTimeOfDay TimeOfDay
- | ValZonedTime ZonedTime
- | ValLocalTime LocalTime
- | ValDay Day
- data SectionKind
Documentation
Headers and assignments corresponding to lines of a TOML file
Constructors
KeyValExpr Key Val | key value assignment: |
TableExpr Key | table: |
ArrayTableExpr Key | array of tables: |
Unvalidated TOML values. Table are represented as a list of assignments rather than as resolved maps.
Constructors
ValInteger Integer | |
ValFloat Double | |
ValArray [Val] | |
ValTable [(Key, Val)] | |
ValBool Bool | |
ValString String | |
ValTimeOfDay TimeOfDay | |
ValZonedTime ZonedTime | |
ValLocalTime LocalTime | |
ValDay Day |
data SectionKind #
Kinds of table headers.
Constructors
TableKind |
|
ArrayTableKind |
|
Instances
Read SectionKind # | |
Defined in Toml.Parser.Types Methods readsPrec :: Int -> ReadS SectionKind readList :: ReadS [SectionKind] readPrec :: ReadPrec SectionKind readListPrec :: ReadPrec [SectionKind] | |
Show SectionKind # | |
Defined in Toml.Parser.Types Methods showsPrec :: Int -> SectionKind -> ShowS show :: SectionKind -> String showList :: [SectionKind] -> ShowS | |
Eq SectionKind # | |
Defined in Toml.Parser.Types |