Copyright | (c) 2020 Kowainik |
---|---|
License | MPL-2.0 |
Maintainer | Kowainik <xrom.xkov@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Trial helpers for tomland
.
Synopsis
- trialCodec :: e -> TomlCodec a -> TomlCodec (Trial e a)
- trialStrCodec :: forall e a. (IsString e, Semigroup e) => (Key -> TomlCodec a) -> Key -> TomlCodec (Trial e a)
- trialMaybeCodec :: TomlCodec a -> TomlCodec (Trial e (Maybe a))
- taggedTrialCodec :: forall tag a. tag -> (Key -> TomlCodec a) -> Key -> TomlCodec (TaggedTrial tag a)
- taggedTrialStrCodec :: forall tag a. (IsString tag, Semigroup tag) => (Key -> TomlCodec a) -> Key -> TomlCodec (TaggedTrial tag a)
- taggedTrialMaybeCodec :: IsString e => TomlCodec a -> TomlCodec (TaggedTrial e (Maybe a))
- taggedTrialListCodec :: forall e a. (IsString e, Semigroup e) => Key -> TomlCodec a -> TomlCodec (TaggedTrial e [a])
Documentation
trialCodec :: e -> TomlCodec a -> TomlCodec (Trial e a) Source #
TomlCodec
for Trial
that adds a given event e
if a given
codec fails.
Since: 0.0.0.0
trialStrCodec :: forall e a. (IsString e, Semigroup e) => (Key -> TomlCodec a) -> Key -> TomlCodec (Trial e a) Source #
TomlCodec
for Trial
that adds an informative message if a
given codec fails.
Since: 0.0.0.0
taggedTrialCodec :: forall tag a. tag -> (Key -> TomlCodec a) -> Key -> TomlCodec (TaggedTrial tag a) Source #
TomlCodec
for TaggedTrial
that uses given tag
in a Fiasco
if a given codec fails, and also adds tag
to the result.
Since: 0.0.0.0
taggedTrialStrCodec :: forall tag a. (IsString tag, Semigroup tag) => (Key -> TomlCodec a) -> Key -> TomlCodec (TaggedTrial tag a) Source #
TomlCodec
for TaggedTrial
that adds an informative message if
a given codec fails, and also adds a tag where the field comes from.
Since: 0.0.0.0