Moduletomland-1.3.3.3Haskell2010
Toml.Codec.Combinator.Set
SPDX-License-Identifier : MPL-2.0 Maintainer : Kowainik xrom.xkov@gmail.com Stability : Stable Portability : Portable
TOML-specific combinators for converting between TOML and Haskell Set-like data types.
There are two way to represent list-like structures with the tomland library.
Ordinary array sets of primitives:
foo = [100, 200, 300]Sets via tables:
foo = [ {x = 100} , {x = 200} , {x = 300} ] OR [[foo]] x = 100 [[foo]] x = 200 [[foo]] x = 300
You can find both types of the codecs in this module for different set-like structures. See the following table for the better understanding:
Haskell Type |
| |
|---|---|---|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
- 6 values
- Packagetomland-1.3.3.3
- Exports6
- LanguageHaskell2010
- LicenceMPL-2.0
- SourceSet.hs
Array sets
3 declarationsCodec for sets of ints. Takes converter for single value and returns a set of ints.
Example:
Haskell IntSet can look like this in your TOML file:
foo = [1, 2, 3]
In case of the missing field, the following error will be seen:
tomland decode error: Key foo is not found