htoml-megaparsec-2.0.0.2: Parser for TOML files

Safe HaskellNone
LanguageHaskell2010

Text.Toml.Types

Synopsis

Documentation

type Table = HashMap Text Node Source #

The TOML Table is a mapping (HashMap) of Text keys to Node values.

emptyTable :: Table Source #

Contruct an empty Table.

type VTArray = Vector Table Source #

An array of Tables, implemented using a Vector.

type VArray = Vector Node Source #

A "value" array that may contain zero or more Nodes, implemented using a Vector.

data Node Source #

A Node may contain any type of value that may be put in a VArray.

Instances
Eq Node Source # 
Instance details

Defined in Text.Toml.Types

Methods

(==) :: Node -> Node -> Bool #

(/=) :: Node -> Node -> Bool #

Show Node Source # 
Instance details

Defined in Text.Toml.Types

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

Generic Node Source # 
Instance details

Defined in Text.Toml.Types

Associated Types

type Rep Node :: * -> * #

Methods

from :: Node -> Rep Node x #

to :: Rep Node x -> Node #

NFData Node Source # 
Instance details

Defined in Text.Toml.Types

Methods

rnf :: Node -> () #

type Rep Node Source # 
Instance details

Defined in Text.Toml.Types

data Explicitness Source #

To mark whether or not a Table has been explicitly defined. See: https://github.com/toml-lang/toml/issues/376

Constructors

Explicit 
Implicit 
Instances
Eq Explicitness Source # 
Instance details

Defined in Text.Toml.Types

Show Explicitness Source # 
Instance details

Defined in Text.Toml.Types

isExplicit :: Explicitness -> Bool Source #

Convenience function to get a boolean value.

insert :: TomlM m => Explicitness -> ([Text], Node) -> Table -> Parser m Table Source #

Inserts a table, Table, with the namespaced name, '[Text]', (which may be part of a table array) into a Table. It may result in an error in the ParsecT monad for redefinitions.

type Toml = State (Set [Text]) Source #

type TomlM m = MonadState (Set [Text]) m Source #

type Parser m a = MonadState (Set [Text]) m => ParsecT Void Text m a Source #