tomland-1.3.3.0: Bidirectional TOML serialization
Copyright(c) 2018-2021 Kowainik
LicenseMPL-2.0
MaintainerKowainik <xrom.xkov@gmail.com>
StabilityStable
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Toml.Codec.Combinator.Table

Description

Contains TOML-specific combinators for converting between TOML and user data types.

Tables can be represented in TOML in one of the following ways:

foo =
    { x = ...
    , y = ...
    , ...
    }

Or

[foo]
    x = ...
    y = ...
    ...

Since: 1.3.0.0

Synopsis

Tables

table :: forall a. TomlCodec a -> Key -> TomlCodec a Source #

Codec for tables. Use it when when you have nested objects.

Since: 0.2.0

Error Helpers

handleTableErrors :: TomlCodec a -> Key -> TOML -> Validation [TomlDecodeError] a Source #

Maps errors in tables with mapTableErrors

Since: 1.3.0.0

mapTableErrors :: Key -> [TomlDecodeError] -> [TomlDecodeError] Source #

Prepends given key to all errors that contain key. This function is used to give better error messages. So when error happens we know all pieces of table key, not only the last one.

Since: 0.2.0