Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type Parser a = forall s. Parsec Text s a
- parseOnly :: Parsec Text (Set [Text]) a -> Text -> Either ParseError a
- tomlDoc :: Parsec Text (Set [Text]) Table
- table :: Parser Table
- inlineTable :: Parser Node
- maybeDupe :: Ord a => [a] -> Maybe a
- namedSection :: Parser ([Text], Node)
- tableHeader :: Parser [Text]
- tableArrayHeader :: Parser [Text]
- headerValue :: Parser [Text]
- assignment :: Parser (Text, Node)
- value :: Parser Node
- array :: Parser Node
- boolean :: Parser Node
- anyStr :: Parser Node
- anyStr' :: Parser Text
- basicStr :: Parser Text
- multiBasicStr :: Parser Text
- literalStr :: Parser Text
- multiLiteralStr :: Parser Text
- datetime :: Parser Node
- float :: Parser Node
- integer :: Parser Node
- arrayOf :: Parser Node -> Parser Node
- escSeq :: Parser Char
- unicodeHex :: Int -> Parser Char
- signed :: Num a => Parser a -> Parser a
- skipBlanks :: Parser ()
- isSpc :: Char -> Bool
- eol :: Parser ()
- module Text.Toml.Types
Documentation
parseOnly :: Parsec Text (Set [Text]) a -> Text -> Either ParseError a Source #
Convenience function for the test suite and GHCI.
tomlDoc :: Parsec Text (Set [Text]) Table Source #
Parses a complete document formatted according to the TOML spec.
inlineTable :: Parser Node Source #
Parses an inline table of key-value pairs.
namedSection :: Parser ([Text], Node) Source #
Parses a Table
or TableArray
with its header.
The resulting tuple has the header's value in the first position, and the
NTable
or NTArray
in the second.
tableHeader :: Parser [Text] Source #
Parses a table header.
tableArrayHeader :: Parser [Text] Source #
Parses a table array header.
headerValue :: Parser [Text] Source #
Parses the value of any header (names separated by dots), into a list of Text
.
literalStr :: Parser Text Source #
Attoparsec double
parses scientific "e" notation; reimplement according to Toml spec.
Utility functions
arrayOf :: Parser Node -> Parser Node Source #
Parses the elements of an array, while restricting them to a certain type.
unicodeHex :: Int -> Parser Char Source #
Parser for unicode hexadecimal values of representation length n
.
skipBlanks :: Parser () Source #
Parses the (rest of the) line including an EOF, whitespace and comments.
isSpc :: Char -> Bool Source #
Results in True
for whitespace chars, tab or space, according to spec.
Parse an EOL, as per TOML spec this is 0x0A a.k.a. '\n' or 0x0D a.k.a. '\r'.
module Text.Toml.Types