bimap package:tomland

Implementation of Tagged Partial Bidirectional Isomorphism. This module contains the BiMap type that represents conversion between two types with the possibility of failure. See Toml.Codec.BiMap.Conversion for examples of BiMap with specific types. The BiMap concept is general and is not specific to TOML, but in this package most usages of BiMap are between TOML values and Haskell values.
Partial bidirectional isomorphism. BiMap a b contains two function:
  1. a -> Either e b
  2. b -> Either e a
If you think of types as sets then this data type can be illustrated by the following picture: BiMap also implements Category typeclass. And this instance can be described clearly by this illustration:
BiMap specialized to TOML error.
Type of errors for TOML BiMap.
Smart constructor for BiMap from a Haskell value (some primitive like Int or Value) to AnyValue.
Converts TomlBiMapError into pretty human-readable text.
Throw error on Left, or perform a given action with Right.