ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.RubyGems.Archive.Yaml

Description

Inert YAML events with bounded aliases and explicit Ruby data tags.

Synopsis

Documentation

data YamlValue Source #

Tags identify data schema only. No class lookup or object construction occurs.

Instances

Instances details
Show YamlValue Source # 
Instance details

Defined in Ecluse.Core.Registry.RubyGems.Archive.Yaml

Eq YamlValue Source # 
Instance details

Defined in Ecluse.Core.Registry.RubyGems.Archive.Yaml

decodeYaml :: Limits -> (Int -> IO ()) -> ByteString -> IO (Either ParseError YamlValue) Source #

Consume one complete document, rejecting cycles, duplicate keys and unsupported tags.

yamlMapping :: YamlValue -> Either ParseError (Map Text YamlValue) Source #

Read a mapping without discarding its checked tag.

yamlSequence :: YamlValue -> Either ParseError [YamlValue] Source #

Read a sequence without constructing Ruby objects.

yamlText :: YamlValue -> Either ParseError Text Source #

Read the exact decoded scalar spelling.

yamlNativeText :: YamlValue -> Either ParseError Text Source #

The String Psych loads from a name, version or platform scalar, refusing nil and other types.

yamlNativeString :: YamlValue -> Either ParseError (Maybe Text) Source #

The String Psych loads from a scalar, or Nothing for its nil, refusing a scalar it types otherwise. Text outside [A-Za-z0-9._-] is left to the caller's name grammar.

yamlField :: Text -> Map Text YamlValue -> Either ParseError YamlValue Source #

Require one named field of a native mapping.

yamlTag :: YamlValue -> Tag Source #

Return the explicit native tag for schema checks.