| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.RubyGems.Archive.Yaml
Description
Inert YAML events with bounded aliases and explicit Ruby data tags.
Synopsis
- data YamlValue
- = YamlScalar Tag Style Text
- | YamlSequence Tag [YamlValue]
- | YamlMapping Tag (Map Text YamlValue)
- decodeYaml :: Limits -> (Int -> IO ()) -> ByteString -> IO (Either ParseError YamlValue)
- yamlMapping :: YamlValue -> Either ParseError (Map Text YamlValue)
- yamlSequence :: YamlValue -> Either ParseError [YamlValue]
- yamlText :: YamlValue -> Either ParseError Text
- yamlNativeText :: YamlValue -> Either ParseError Text
- yamlNativeString :: YamlValue -> Either ParseError (Maybe Text)
- yamlField :: Text -> Map Text YamlValue -> Either ParseError YamlValue
- yamlTag :: YamlValue -> Tag
Documentation
Tags identify data schema only. No class lookup or object construction occurs.
Constructors
| YamlScalar Tag Style Text | |
| YamlSequence Tag [YamlValue] | |
| YamlMapping Tag (Map Text YamlValue) |
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.
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.