| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Toml.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]