HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

ModuleHsYAML-0.2.1.4Haskell2010

Data.YAML.Token

Tokenizer for the YAML 1.2 syntax as defined in http://yaml.org/spec/1.2/spec.html.

  • 3 types
  • 1 value
  • PackageHsYAML-0.2.1.4
  • Exports4
  • LanguageHaskell2010
  • LicenceGPL-2.0-only
  • SourceToken.hs
valuetokenize :: ByteString -> Bool -> [Token]
#

tokenize input emit_unparsed converts the Unicode input (using the UTF-8, UTF-16 (LE or BE), or UTF-32 (LE or BE) encoding) to a list of Token according to the YAML 1.2 specification.

Errors are reported as tokens with Error :: Code, and the unparsed text following an error may be attached as a final Unparsed token (if the emit_unparsed argument is True). Note that tokens are available "immediately", allowing for streaming of large YAML files with memory requirements depending only on the YAML nesting level.

datadata Token
#

Parsed token.

Constructors

Instances4Show, Generic, NFData, Rep
datadata Code
#

Token codes.

Constructors

Instances5Eq, Show, Generic, NFData, Rep
datadata Encoding
#

Denotes the Unicode Transformation Format (UTF) used for serializing the YAML document

Constructors

Instances5Eq, Show, Generic, NFData, Rep