Moduletomland-1.3.3.3Haskell2010
Toml.Codec.BiMap.Conversion
SPDX-License-Identifier : MPL-2.0 Maintainer : Kowainik xrom.xkov@gmail.com Stability : Stable Portability : Portable
Implementations of BiMap for specific Haskell types and TOML values. Usually, you use codecs from the Toml.Codec.Combinator module. You may need to use these BiMaps instead of codecs in the following situations:
Contents
Synopsis
- value _Bool
- value _Int
- value _Word
- value _Word8
- value _Integer
- value _Natural
- value _Double
- value _Float
- value _Text
- value _LText
- value _ByteString
- value _LByteString
- value _String
- value _ZonedTime
- value _LocalTime
- value _Day
- value _TimeOfDay
- value _Array
- value _NonEmpty
- value _Set
- value _HashSet
- value _IntSet
- value _ByteStringArray
- value _LByteStringArray
- value _Coerce
- value _EnumBounded
- value _Read
- value _TextBy
- value _Validate
- value _Hardcoded
- value _KeyText
- value _KeyString
- value _KeyInt
- value _Just
- value _Left
- value _Right
- value _LTextText
- value _NaturalInteger
- value _NonEmptyList
- value _StringText
- value _ReadString
- value _BoundedInteger
- value _EnumBoundedText
- value _ByteStringText
- value _LByteStringText
- Packagetomland-1.3.3.3
- Exports45
- LanguageHaskell2010
- LicenceMPL-2.0
- SourceConversion.hs
Primitive
Boolean
Integral
Floating
Text
UTF-8 encoded ByteString BiMap for AnyValue. Usually used as the byteString combinator.
UTF-8 encoded lazy ByteString BiMap for AnyValue. Usually used as the lazyByteString combinator.
Time
Arrays
Takes a BiMap of a value and returns a BiMap for a NonEmpty
list of values and AnyValue as an array. Usually used as the
arrayNonEmptyOf combinator.
Takes a BiMap of a value and returns a BiMap for a Set of
values and AnyValue as an array. Usually used as the
arraySetOf combinator.
Takes a BiMap of a value and returns a BiMap for a HashSet of
values and AnyValue as an array. Usually used as the
arrayHashSetOf combinator.
IntSet bimap for AnyValue. Usually used as the arrayIntSet combinator.
ByteString BiMap for AnyValue encoded as a list of bytes (non-negative integers between 0 and 255). Usually used as the byteStringArray combinator.
Lazy ByteString BiMap for AnyValue encoded as a list of bytes (non-negative integers between 0 and 255). Usually used as lazyByteStringArray combinator.
Coerce
Custom
BiMap for nullary sum data types (enumerations) with Show, Enum and Bounded instances. Usually used as the enumBounded combinator.
_TextBy By the given BiMap validates it with the given predicate that returns Either the value, if the validation is successful, or the Text of the error that should be returned in case of validation failure.
Usually used as the validate or validateIf combinator.
BiMap for hardcoded values. It returns the same value in case of success and ArbitraryError in other case.
Keys
Bidirectional converter between Key and Int. Usually used as an argument for tableIntMap.
General purpose
Internal helpers
Helper BiMap for _EnumBounded and Text.
Helper BiMap for Text and strict ByteString
Helper BiMap for Text and lazy ByteString.