Idris2Doc : Text.YAML.Node

Text.YAML.Node

(source)

Definitions

dataSTag : Type
  A node's specific tag after schema resolution [spec chapter 10].

The tags of the core schema get their own constructors for cheap
matching; anything else (`tag:yaml.org,2002:set`, local `!foo`
tags, ...) is `TOther`.

Totality: total
Visibility: public export
Constructors:
TNull : STag
TBool : STag
TInt : STag
TFloat : STag
TStr : STag
TSeq : STag
TMap : STag
TOther : String->STag

Hints:
EqSTag
ShowSTag
tagURI : STag->String
  The URI form of a specific tag, e.g. `tag:yaml.org,2002:int`.

Totality: total
Visibility: public export
fromURI : String->STag
  Inverse of `tagURI`: maps the core schema URIs to their
constructors, anything else to `TOther`.

Totality: total
Visibility: public export
dataNode : Type
  A composed YAML node: the output of the composer, with aliases
substituted and tags resolved.

Scalars keep their raw text (interpreted on demand by the views
below) together with their presentation style.

Totality: total
Visibility: public export
Constructors:
NScalar : STag->Style->String->Node
NSeq : STag->ListNode->Node
NMap : STag->List (Node, Node) ->Node

Hints:
EqNode
ShowNode
canon : Node->String
  Renders a node in compact flow style, with all scalars quoted.

Totality: total
Visibility: export
dataSchema : Type
  The schema used to resolve the tags of untagged nodes
[spec chapter 10].

Totality: total
Visibility: public export
Constructors:
Failsafe : Schema
  Untagged scalars and collections become str/seq/map.
Core : Schema
  Untagged plain scalars additionally resolve to null, bool, int
and float by their form. The recommended default.

Hints:
EqSchema
ShowSchema
resolvePlain : String->STag
  The specific tag of an untagged plain scalar under the core schema
[spec 10.3.2].

Totality: total
Visibility: export
scalarTag : Schema->Tag->Style->String->STag
  The specific tag of a scalar node. Explicitly tagged scalars keep
their tag without validation: a `!!int abc` node composes fine, and
the typed views below surface the mismatch on access.

Totality: total
Visibility: export
collTag : Schema->Tag->STag->STag
  The specific tag of a collection node, given its default
(`TSeq` or `TMap`).

Totality: total
Visibility: export
nodeTag : Node->STag
Totality: total
Visibility: public export
isNull : Node->Bool
Totality: total
Visibility: public export
asText : Node->MaybeString
  The raw text of any scalar node.

Totality: total
Visibility: public export
asString : Node->MaybeString
  The text of a str-tagged scalar node.

Totality: total
Visibility: public export
asBool : Node->MaybeBool
  The value of a bool-tagged scalar node.

Totality: total
Visibility: public export
asInteger : Node->MaybeInteger
  The value of an int-tagged scalar node (decimal with optional
sign, `0x` hexadecimal or `0o` octal).

Totality: total
Visibility: public export
asDouble : Node->MaybeDouble
  The numeric value of a float- or int-tagged scalar node.

Totality: total
Visibility: public export
asSeq : Node->Maybe (ListNode)
Totality: total
Visibility: public export
asMap : Node->Maybe (List (Node, Node))
Totality: total
Visibility: public export
lookupKey : String->Node->MaybeNode
  The value of the first mapping entry whose key is a scalar with
the given raw text.

Totality: total
Visibility: public export