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 |
TOML-specific combinators for converting between TOML and Haskell Monoid
wrapper data types. These codecs are especially handy when you are implementing
the Partial Options Monoid
pattern.
Haskell Type | TOML
| TomlCodec
| Default on missing field |
---|---|---|---|
All | a = true |
|
|
Any | a = true |
|
|
| a = 11 |
|
|
| a = 11 |
|
|
| a = 42 |
|
|
| a = true |
|
|
Since: 1.3.0.0
Synopsis
- all :: Key -> TomlCodec All
- any :: Key -> TomlCodec Any
- sum :: Num a => (Key -> TomlCodec a) -> Key -> TomlCodec (Sum a)
- product :: Num a => (Key -> TomlCodec a) -> Key -> TomlCodec (Product a)
- first :: (Key -> TomlCodec a) -> Key -> TomlCodec (First a)
- last :: (Key -> TomlCodec a) -> Key -> TomlCodec (Last a)