kowainik / tomland

🏝 Bidirectional TOML serialization
https://kowainik.github.io/posts/2019-01-14-tomland
Mozilla Public License 2.0
120 stars 39 forks source link

Add 'either' and 'validation' codecs for returning TOML errors #326

Open chshersh opened 4 years ago

chshersh commented 4 years ago

The following codecs can be useful for cases when we want to print pretty error messages:

either :: TomlCodec a -> TomlCodec (Either [TomlDecodeError] a)
validation :: TomlCodec a -> TomlCodec (Validation [TomlDecodeError] a)