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.Semantics

Description

This module extracts a nested Map representation of a TOML file. It detects invalid key assignments and resolves dotted key assignments.

Synopsis

Documentation

data SemanticError Source #

This type represents errors generated when resolving keys in a TOML document.

Since: 1.3.0.0

Constructors

SemanticError 

Fields

Instances

Instances details
Read SemanticError Source #

Default instance

Instance details

Defined in Toml.Semantics

Methods

readsPrec :: Int -> ReadS SemanticError

readList :: ReadS [SemanticError]

readPrec :: ReadPrec SemanticError

readListPrec :: ReadPrec [SemanticError]

Show SemanticError Source #

Default instance

Instance details

Defined in Toml.Semantics

Methods

showsPrec :: Int -> SemanticError -> ShowS

show :: SemanticError -> String

showList :: [SemanticError] -> ShowS

Eq SemanticError Source #

Default instance

Instance details

Defined in Toml.Semantics

Ord SemanticError Source #

Default instance

Instance details

Defined in Toml.Semantics

data SemanticErrorKind Source #

Enumeration of the kinds of conflicts a key can generate.

Since: 1.3.0.0

Constructors

AlreadyAssigned

Attempted to assign to a key that was already assigned

ClosedTable

Attempted to open a table already closed

ImplicitlyTable

Attempted to open a tables as an array of tables that was implicitly defined to be a table

Instances

Instances details
Read SemanticErrorKind Source #

Default instance

Instance details

Defined in Toml.Semantics

Show SemanticErrorKind Source #

Default instance

Instance details

Defined in Toml.Semantics

Methods

showsPrec :: Int -> SemanticErrorKind -> ShowS

show :: SemanticErrorKind -> String

showList :: [SemanticErrorKind] -> ShowS

Eq SemanticErrorKind Source #

Default instance

Instance details

Defined in Toml.Semantics

Ord SemanticErrorKind Source #

Default instance

Instance details

Defined in Toml.Semantics

semantics :: [Expr] -> Either (Located SemanticError) Table Source #

Extracts a semantic value from a sequence of raw TOML expressions, or reports a semantic error if one occurs.

Since: 1.3.0.0