Copyright | (c) Eric Mertens 2023 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module parses TOML tokens into a list of raw, uninterpreted sections and assignments.
Types
Headers and assignments corresponding to lines of a TOML file
KeyValExpr Key Val | key value assignment: |
TableExpr Key | table: |
ArrayTableExpr Key | array of tables: |
data SectionKind Source #
Kinds of table headers.
TableKind |
|
ArrayTableKind |
|
Instances
Read SectionKind Source # | |
Defined in Toml.Parser.Types readsPrec :: Int -> ReadS SectionKind # readList :: ReadS [SectionKind] # readPrec :: ReadPrec SectionKind # readListPrec :: ReadPrec [SectionKind] # | |
Show SectionKind Source # | |
Defined in Toml.Parser.Types showsPrec :: Int -> SectionKind -> ShowS # show :: SectionKind -> String # showList :: [SectionKind] -> ShowS # | |
Eq SectionKind Source # | |
Defined in Toml.Parser.Types (==) :: SectionKind -> SectionKind -> Bool # (/=) :: SectionKind -> SectionKind -> Bool # |
Unvalidated TOML values. Table are represented as a list of assignments rather than as resolved maps.
ValInteger Integer | |
ValFloat Double | |
ValArray [Val] | |
ValTable [(Key, Val)] | |
ValBool Bool | |
ValString String | |
ValTimeOfDay TimeOfDay | |
ValZonedTime ZonedTime | |
ValLocalTime LocalTime | |
ValDay Day |
Instances
Parser
parseRawToml :: String -> Either (Located String) [Expr] Source #
Parse a list of tokens either returning the first unexpected token or a list of the TOML statements in the file to be processed by Toml.Semantics.