toml-parser-1.3.2.0: TOML 1.0.0 parser
Copyright(c) Eric Mertens 2023
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

Toml.Parser.Types

Description

This module provides a raw representation of TOML files as a list of table definitions and key-value assignments.

These values use the raw dotted keys and have no detection for overlapping assignments.

Further processing will happen in the Semantics module.

Synopsis

Documentation

type Key = NonEmpty (Located String) Source #

Non-empty sequence of dotted simple keys

data Expr Source #

Headers and assignments corresponding to lines of a TOML file

Constructors

KeyValExpr Key Val

key value assignment: key = value

TableExpr Key

table: [key]

ArrayTableExpr Key

array of tables: [[key]]

Instances

Instances details
Read Expr Source # 
Instance details

Defined in Toml.Parser.Types

Show Expr Source # 
Instance details

Defined in Toml.Parser.Types

Methods

showsPrec :: Int -> Expr -> ShowS #

show :: Expr -> String #

showList :: [Expr] -> ShowS #

data Val Source #

Unvalidated TOML values. Table are represented as a list of assignments rather than as resolved maps.

Instances

Instances details
Read Val Source # 
Instance details

Defined in Toml.Parser.Types

Show Val Source # 
Instance details

Defined in Toml.Parser.Types

Methods

showsPrec :: Int -> Val -> ShowS #

show :: Val -> String #

showList :: [Val] -> ShowS #

data SectionKind Source #

Kinds of table headers.

Constructors

TableKind
table
ArrayTableKind
[array of tables
]