tomland-0.4.0: Bidirectional TOML parser

Safe HaskellNone
LanguageHaskell2010

Toml.Edsl

Description

This module introduces EDSL for manually specifying TOML data types.

Example:

exampleToml :: TOML
exampleToml = mkToml $ do
    "key1" =: 1
    "key2" =: Bool True
    table "tableName" $
        "tableKey" =: Array [Oh, Hi, Mark]
Synopsis

Documentation

mkToml :: TDSL -> TOML Source #

Creates TOML from the TDSL.

(=:) :: Key -> Value a -> TDSL Source #

Adds key-value pair to the TDSL.

table :: Key -> TDSL -> TDSL Source #

Adds table to the TDSL.