| Copyright | (c) 2018-2021 Kowainik |
|---|---|
| License | MPL-2.0 |
| Maintainer | Kowainik <xrom.xkov@gmail.com> |
| Stability | Stable |
| Portability | Portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Toml.Parser.Item
Description
This module contains the definition of the TomlItem data type which
represents either key-value pair or table name. This data type serves the
purpose to be the intermediate representation of parsing a TOML file which will
be assembled to TOML AST later.
Since: 1.2.0.0
Documentation
One item of a TOML file. It could be either:
- A name of a table
- A name of a table array
- Key-value pair
- Inline table
- Inline array of tables
Knowing a list of TomlItems, it's possible to construct TOML
from this information.
Constructors
| TableName !Key | |
| TableArrayName !Key | |
| KeyVal !Key !AnyValue | |
| InlineTable !Key !Table | |
| InlineTableArray !Key !(NonEmpty Table) |
Instances
Table that contains only key = val pairs.
setTableName :: Key -> TomlItem -> TomlItem Source #
Changes name of table to a new one. Works only for TableName and
TableArrayName constructors.