| Copyright | (c) 2018-2022 Kowainik |
|---|---|
| License | MPL-2.0 |
| Maintainer | Kowainik <xrom.xkov@gmail.com> |
| Stability | Stable |
| Portability | Portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Toml.Type.Edsl
Description
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 ::TOMLexampleToml =mkToml$ do "key1"=:1 "key2"=:Bool Truetable"meme-quotes" $ "quote1"=:Array ["Oh", "Hi", "Mark"]tableArray"arrayName" $ "elem1"=:"yes" :| [table"elem2" $ "deep"=:Integer 7 ,empty]
Since: 0.3