HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduletoml-parser-2.0.2.0Haskell2010

Toml.Schema.Matcher

This type helps to build up computations that can validate a TOML value and compute some application-specific representation.

It supports warning messages which can be used to deprecate old configuration options and to detect unused table keys.

It supports tracking multiple error messages when you have more than one decoding option and all of them have failed.

Use Toml.Pretty.prettyMatchMessage for an easy way to make human readable strings from matcher outputs.

Contents
  1. Types
  2. Operations
  3. Run helpers
  4. Scope helpers
Synopsis

Types

newtypenewtype Matcher l a

Computations that result in a Result and which track a list of nested contexts to assist in generating warnings and error messages.

Use withScope to run a Matcher in a new, nested scope.

Instances6Monad, Functor, MonadFail, Applicative, Alternative, MonadPlus
  • Monad (Matcher a)Defined in toml-parser-2.0.2.0 · Toml.Schema.Matcher
  • Functor (Matcher a)Defined in toml-parser-2.0.2.0 · Toml.Schema.Matcher
  • MonadFail (Matcher a)Defined in toml-parser-2.0.2.0 · Toml.Schema.Matcher

    Fail with an error message without an annotation.

  • Applicative (Matcher a)Defined in toml-parser-2.0.2.0 · Toml.Schema.Matcher
  • Alternative (Matcher a)Defined in toml-parser-2.0.2.0 · Toml.Schema.Matcher
  • MonadPlus (Matcher a)Defined in toml-parser-2.0.2.0 · Toml.Schema.Matcher
datadata Result e a

Computation outcome with error and warning messages. Multiple error messages can occur when multiple alternatives all fail. Resolving any one of the error messages could allow the computation to succeed.

Constructors

Instances4Eq, Ord, Read, Show
  • (Eq e, Eq a) => Eq (Result e a)Defined in toml-parser-2.0.2.0 · Toml.Schema.Matcher

    Default instance

  • (Ord e, Ord a) => Ord (Result e a)Defined in toml-parser-2.0.2.0 · Toml.Schema.Matcher

    Default instance

  • (Read e, Read a) => Read (Result e a)Defined in toml-parser-2.0.2.0 · Toml.Schema.Matcher

    Default instance

  • (Show e, Show a) => Show (Result e a)Defined in toml-parser-2.0.2.0 · Toml.Schema.Matcher

    Default instance

datadata MatchMessage a

A message emitted while matching a TOML value. The message is paired with the path to the value that was in focus when the message was generated. These message get used for both warnings and errors.

For a convenient way to render these to a string, see Toml.Pretty.prettyMatchMessage.

Constructors

Instances7Functor, Foldable, Traversable, Eq, Ord, Read, …

Operations

Run helpers

Scope helpers

datadata Scope

Scopes for TOML message.

Constructors

Instances4Eq, Ord, Read, Show
  • Eq ScopeDefined in toml-parser-2.0.2.0 · Toml.Schema.Matcher

    Default instance

  • Ord ScopeDefined in toml-parser-2.0.2.0 · Toml.Schema.Matcher

    Default instance

  • Read ScopeDefined in toml-parser-2.0.2.0 · Toml.Schema.Matcher

    Default instance

  • Show ScopeDefined in toml-parser-2.0.2.0 · Toml.Schema.Matcher

    Default instance