Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type TomlError = ParseErrorBundle Text Void
- parseOnly :: Parser Toml a -> Text -> Either TomlError a
- tomlDoc :: TomlM m => Parser m Table
- table :: TomlM m => Parser m Table
- inlineTable :: TomlM m => Parser m (Either (Set (ErrorFancy Void)) Node)
- maybeDupe :: Ord a => [a] -> Maybe a
- namedSection :: TomlM m => Parser m ([Text], Node)
- tableHeader :: TomlM m => Parser m [Text]
- tableArrayHeader :: TomlM m => Parser m [Text]
- headerValue :: TomlM m => Parser m [Text]
- assignment :: TomlM m => Parser m (Text, Node)
- value :: TomlM m => Parser m (Either (Set (ErrorFancy Void)) Node)
- array :: TomlM m => Parser m Node
- boolean :: TomlM m => Parser m Node
- anyStr :: TomlM m => Parser m Node
- anyStr' :: TomlM m => Parser m Text
- basicStr :: TomlM m => Parser m Text
- multiBasicStr :: TomlM m => Parser m Text
- literalStr :: TomlM m => Parser m Text
- multiLiteralStr :: TomlM m => Parser m Text
- datetime :: TomlM m => Parser m Node
- float :: TomlM m => Parser m Node
- integer :: TomlM m => Parser m Node
- arrayOf :: TomlM m => Parser m Node -> Parser m Node
- escSeq :: TomlM m => Parser m Char
- unicodeHex :: TomlM m => Int -> Parser m Char
- signed :: (Num a, TomlM m) => Parser m a -> Parser m a
- skipBlanks :: TomlM m => Parser m ()
- isSpc :: Char -> Bool
- module Text.Toml.Types
Documentation
parseOnly :: Parser Toml a -> Text -> Either TomlError a Source #
Convenience function for the test suite and GHCI.
tomlDoc :: TomlM m => Parser m Table Source #
Parses a complete document formatted according to the TOML spec.
inlineTable :: TomlM m => Parser m (Either (Set (ErrorFancy Void)) Node) Source #
Parses an inline table of key-value pairs.
namedSection :: TomlM m => Parser m ([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.
headerValue :: TomlM m => Parser m [Text] Source #
Parses the value of any header (names separated by dots), into a list of Text
.
float :: TomlM m => Parser m Node Source #
Attoparsec double
parses scientific "e" notation; reimplement according to Toml spec.
arrayOf :: TomlM m => Parser m Node -> Parser m Node Source #
Parses the elements of an array, while restricting them to a certain type.
unicodeHex :: TomlM m => Int -> Parser m Char Source #
Parser for unicode hexadecimal values of representation length n
.
signed :: (Num a, TomlM m) => Parser m a -> Parser m a Source #
Parser for signs (a plus or a minus).
skipBlanks :: TomlM m => Parser m () 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.
module Text.Toml.Types