HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduletoml-parser-2.0.0.0Haskell2010

Toml.Semantics.Types

This module provides the type for the semantics of a TOML file. All dotted keys are resolved in this representation. Each table is a Map with a single level of keys.

Values are parameterized over an annotation type to allow values to be attributed to a file location. When values are constructed programmatically, there might not be any interesting annotations. In this case a trivial () unit annotation can be used. The Value type-synonym and related pattern synonyms can make using this case more convenient.

  • 4 types
  • 4 values

Unlocated value synonyms

2 declarations

Annotated values

12 declarations
datadata Value' a
#

Semantic TOML value with all table assignments resolved.

Instances9Functor, Foldable, Traversable, FromValue, ToValue, Eq, …
  • Functor Value'Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Derived

  • Foldable Value'Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Derived

  • Traversable Value'Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Derived

  • FromValue ValueDefined in toml-parser-2.0.0.0 · Toml.Schema.FromValue

    Matches all values, used for pass-through

  • ToValue ValueDefined in toml-parser-2.0.0.0 · Toml.Schema.ToValue

    Identity function

  • Eq a => Eq (Value' a)Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Nearly default instance except ZonedTime doesn't have an Eq instance. ZonedTime values are equal if their times and time-zones are both equal.

  • Read a => Read (Value' a)Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Default instance

  • Show a => Show (Value' a)Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Default instance

  • () ~ a => IsString (Value' a)Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Constructs a TOML string literal.

    fromString = String
    
newtypenewtype Table' a
#

A table with annotated keys and values.

Constructors

Instances9Functor, Foldable, Traversable, FromValue, Eq, Read, …
  • Functor Table'Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Derived

  • Foldable Table'Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Derived

  • Traversable Table'Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Derived

  • FromValue TableDefined in toml-parser-2.0.0.0 · Toml.Schema.FromValue
  • Eq a => Eq (Table' a)Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Default instance

  • Read a => Read (Table' a)Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Default instance

  • Show a => Show (Table' a)Defined in toml-parser-2.0.0.0 · Toml.Semantics.Types

    Default instance

  • ToTable (Table' a)Defined in toml-parser-2.0.0.0 · Toml.Schema.ToValue
  • ToValue (Table' a)Defined in toml-parser-2.0.0.0 · Toml.Schema.ToValue

Utilities

4 declarations
valuevalueAnn :: Value' a -> a
#

Extract the top-level annotation from a value.