Copyright | (c) 2018-2022 Kowainik |
---|---|
License | MPL-2.0 |
Maintainer | Kowainik <xrom.xkov@gmail.com> |
Stability | Stable |
Portability | Portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- table :: forall a. TomlCodec a -> Key -> TomlCodec a
- handleTableErrors :: TomlCodec a -> Key -> TOML -> Validation [TomlDecodeError] a
- mapTableErrors :: Key -> [TomlDecodeError] -> [TomlDecodeError]
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