GPL-2.0-only licensed by Herbert Valerio Riedel
Maintained by [email protected]
This version can be pinned in stack with:HsYAML-,3867

Module documentation for

Used by 2 packages in lts-14.27(full list with versions):

HsYAML is a YAML 1.2 parser implementation for Haskell.

Features of HsYAML include:

  • Pure Haskell implementation with small dependency footprint and emphasis on strict compliance with the YAML 1.2 specification.

  • Direct decoding to native Haskell types via (aeson-inspired) typeclass-based API (see Data.YAML).

  • Support for constructing custom YAML node graph representation (including support for cyclic YAML data structures).

  • Support for the standard (untyped) Failsafe, (strict) JSON, and (flexible) Core "schemas" providing implicit typing rules as defined in the YAML 1.2 specification (including support for user-defined custom schemas).

  • Event-based API resembling LibYAML's Event-based API (see Data.YAML.Event).

  • Low-level API access to lexical token-based scanner (see Data.YAML.Token).


See also

  • Add convenience functions decode1 and decode1Strict expecting exactly one YAML document (#5)
  • Fix a couple corner-cases in the YAML tokenization (#10)

  • Fix bug in float regexp being too lax in the JSON and Core schema (#7)
  • Remove dependency on dlist

  • Tolerate BOM at each l-document-prefix (rather than only at the first one encountered in a YAML stream)
  • Workaround broken mtl-2.2.2 bundled in GHC 8.4.1 (#1)
  • Relax to GPL-2.0-or-later

  • Reject (illegal) non-scalar code-points in UTF-32 streams
  • Tolerate BOM at start of stream
  • Disambiguate choice in l-any-document production regarding token separation of c-directives-end
  • Fix c-indentation-indicator(n) grammar production when auto-detecting indentation in the presence of empty leading lines; also reject (illegal) auto-indent-level scalars with leading more-indented all-space lines
  • Complete character escape rules for double-quoted scalars
  • Minor optimizations

  • Data.YAML module promoted from TrustWorthy to Safe
  • Add FromYAML Natural instance
  • Add MonadFail, Alternative, and MonadPlus instances for Data.YAML.Parser
  • Add Data.YAML.decodeStrict function
  • Export Data.YAML.typeMismatch helper function

  • First version. Released on an unsuspecting world.