Monad for creating TOML.
Moduletomland-1.3.3.3Haskell2010
Toml.Type.Edsl
SPDX-License-Identifier : MPL-2.0 Maintainer : Kowainik xrom.xkov@gmail.com Stability : Stable Portability : Portable
This module introduces EDSL for manually specifying TOML data types.
Consider the following raw TOML:
key1 = 1
key2 = true
[meme-quotes]
quote1 = [ "Oh", "Hi", "Mark" ]
[[arrayName]]
elem1 = "yes"
[[arrayName]]
[arrayName.elem2]
deep = 7
[[arrayName]]
using functions from this module you can specify the above TOML in safer way:
exampleToml :: TOML
exampleToml = mkToml $ do
"key1" =: 1
"key2" =: Bool True
table "meme-quotes" $
"quote1" =: Array ["Oh", "Hi", "Mark"]
tableArray "arrayName" $
"elem1" =: "yes" :|
[ table "elem2" $ "deep" =: Integer 7
, empty
]
- 1 type
- 5 values
- Packagetomland-1.3.3.3
- Exports6
- LanguageHaskell2010
- LicenceMPL-2.0
- SourceEdsl.hs
Creates an empty TDSL.
Adds key-value pair to the TDSL.
Adds table to the TDSL.
Adds array of tables to the TDSL.