tomland-1.3.3.3: Bidirectional TOML serialization

Copyright | (c) 2018-2022 Kowainik
License | MPL-2.0
Maintainer | Kowainik <xrom.xkov@gmail.com>
Stability | Stable
Portability | Portable
Safe Haskell | None
Language | Haskell2010

Toml.Parser

Description

Parser for text to TOML AST.

Since: 0.0.0

Synopsis

- newtype TomlParseError = TomlParseError {
  - unTomlParseError :: Text
  }
- parse :: Text -> Either TomlParseError TOML
- parseKey :: Text -> Either TomlParseError Key

# Documentation

newtype TomlParseError #

Pretty parse exception for parsing toml.

Since: 1.3.0.0

Constructors

TomlParseError |
Fields unTomlParseError :: Text

#### Instances

Instances details

NFData TomlParseError # |
Instance details Defined in Toml.Parser Methods rnf :: TomlParseError -> () #
Generic TomlParseError # |
Instance details Defined in Toml.Parser Associated Types
type Rep TomlParseError |
Instance details Defined in Toml.Parser type Rep TomlParseError = D1 ('MetaData "TomlParseError" "Toml.Parser" "tomland-1.3.3.3-EUmut0o3bp2HnXO9U1VNsY" 'True) (C1 ('MetaCons "TomlParseError" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTomlParseError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
Methods from :: TomlParseError -> Rep TomlParseError x # to :: Rep TomlParseError x -> TomlParseError #
Show TomlParseError # |
Instance details Defined in Toml.Parser Methods showsPrec :: Int -> TomlParseError -> ShowS # show :: TomlParseError -> String # showList :: [TomlParseError] -> ShowS #
Eq TomlParseError # |
Instance details Defined in Toml.Parser Methods (==) :: TomlParseError -> TomlParseError -> Bool # (/=) :: TomlParseError -> TomlParseError -> Bool #
type Rep TomlParseError # |
Instance details Defined in Toml.Parser type Rep TomlParseError = D1 ('MetaData "TomlParseError" "Toml.Parser" "tomland-1.3.3.3-EUmut0o3bp2HnXO9U1VNsY" 'True) (C1 ('MetaCons "TomlParseError" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTomlParseError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

parse :: Text -> Either TomlParseError TOML #

Parses `Text` as `TOML` AST object. If you want to convert `Text` to your custom haskell data type, use `decode` or `decodeFile` functions.

Since: 0.0.0

parseKey :: Text -> Either TomlParseError Key #

Parse TOML `Key` from `Text`.

Since: 1.3.0.0