Home
package
AsciiDoc
validate
from_quote
attributes
materialize_attributes
render_inline_attributes
default_options
parse_str
parse_with
render_inline
render
select_include
select_include_with
Lints
ValidationProps
Document
Attribute
Attributes
Block
is_eq
Error
Options
IncludeSelection
IncludeProblem
IncludeContext
CSV
is_eq
to_hash
from_quote
validate
validate_as
parse_records
parser
split_header
parse_with
decode
record
field
string
u64
f64
parse
parse_normalized
parse_headerless
Record
Error
HeaderMode
Lints
ValidationProps
DecodeValidationProps
Decoded
from_quote
Parseable
Format
rename_field
parse_str
parse_bool
parse_u8
parse_i8
parse_u16
parse_i16
parse_u32
parse_i32
parse_u64
parse_i64
parse_u128
parse_i128
parse_dec
parse_f32
parse_f64
parse_null
parse_record_start
parse_record_field
parse_record_after_field
skip_record_field
parse_tuple_start
parse_tuple_next
invalid_value
parse_tuple_end
parse_tag_union
State
HTTP
validate_request
validate_response
header
parse_request
parse_response
parse_requests
request
response
Lints
ValidationProps
RequestLiteral
from_quote
ResponseLiteral
from_quote
Method
Version
Header
Request
Response
Error
JsonValue
is_eq
to_hash
validate
from_quote
parse_str
parse_with
parser
parser_with
get
at
get_path
keys
as_str
as_bool
as_list
as_object
as_i64
as_u64
as_dec
to_str
to_str_with
Error
Options
ValidationProps
WriteOptions
Literal
require
error
position
ErrorProps
Markdown
to_inspect
is_eq
validate
to_hash
parse_str
parse_inlines
parser
inline_parser
frontmatter
Lints
ValidationProps
Document
from_quote
Level
to_inspect
to_str
is_eq
to_hash
ListKind
to_inspect
to_str
is_eq
to_hash
TaskState
to_inspect
to_str
is_eq
to_hash
Alignment
to_inspect
to_str
is_eq
to_hash
LinkTarget
Inline
to_inspect
is_eq
to_hash
Parser
custom
run
parse
fail
const
alt
one_of
map
map2
map3
flatten
and_then
lazy
maybe
many
one_or_more
between
sep_by_one_or_more
sep_by
ignore
keep
skip
chomp_until
chomp_while
span
ParseResult
RocSyntax
from_quote
validate
tokenize_bytes
tokenize_str
highlight_category
parse_str
parse_bytes
parse_expression
parse_expr_str
parse_expr_bytes
parse_statement_str
parse_header_str
Span
TokenKind
Token
NodeKind
Node
DiagnosticCode
Diagnostic
Status
Parsed
LintProps
ValidateProps
Tokenized
HighlightCategory
Utf8
parse_quote
parse_str
parse_str_partial
parse_bytes
parse_bytes_partial
codeunit_satisfies
codeunit
utf8
string
any_codeunit
rest
rest_str
digit
digits
find_any
skip_class
find_line_end
span_class
Bytes
QuoteProps
ByteClass
from_bytes
from_predicate
complement
contains
Xml
is_eq
to_hash
validate
from_quote
parse_str
parser
Lints
ValidationProps
Attribute
TextEncoding
Declaration
Version
Node
is_eq
to_hash
name
attribute
children_named
text
Error
Yaml
tokenize_str
tokenize_bytes
highlight_category
is_eq
to_hash
from_quote
validate
validate_as
parse_str
parser
get
at
get_path
as_str
as_i64
as_bool
as_list
to_inspect
decode
decoder
Error
Span
TokenKind
TokenRole
ScalarCategory
Token
DiagnosticCode
Diagnostic
TokenStatus
Tokenized
HighlightCategory
Lints
ValidationProps
DecodeValidationProps
Decoded
from_quote
DecodeOptions
Parseable
Format
rename_field
parse_str
parse_bool
parse_u8
parse_i8
parse_u16
parse_i16
parse_u32
parse_i32
parse_u64
parse_i64
parse_u128
parse_i128
parse_dec
parse_f32
parse_f64
parse_null
parse_tag_union
parse_list_start
parse_list_next
parse_list_after_item
parse_tuple_start
parse_tuple_next
parse_tuple_end
parse_record_start
parse_record_field
parse_record_after_field
skip_record_field
parse_dict_start
parse_dict_next
parse_dict_after_key
parse_dict_after_entry
invalid_value
parse_key_str
parse_key_u8
parse_key_i8
parse_key_u16
parse_key_i16
parse_key_u32
parse_key_i32
parse_key_u64
parse_key_i64
Cursor
AsciiDoc
AsciiDoc
.
validate
:
ValidationProps
->
Try
(
Document
, [
BadQuotedBytes
(
Str
)])
AsciiDoc
.
from_quote
:
Str
->
Try
(
AsciiDoc
, [
BadQuotedBytes
(
Str
)])
AsciiDoc
.
attributes
:
List
(
Attribute
)
->
Attributes
AsciiDoc
.
materialize_attributes
:
Attributes
->
List
(
Attribute
)
AsciiDoc
.
render_inline_attributes
:
Str
,
Attributes
->
Str
AsciiDoc
.
default_options
:
Options
AsciiDoc
.
parse_str
:
Str
->
Try
(
Document
, [
Unsupported
(
Error
),
InvalidAsciiDoc
(
Error
)])
AsciiDoc
.
parse_with
:
Str
,
Options
->
Try
(
Document
, [
Unsupported
(
Error
),
InvalidAsciiDoc
(
Error
)])
AsciiDoc
.
render_inline
:
Str
,
List
(
Attribute
)
->
Str
AsciiDoc
.
render
:
Document
->
Str
AsciiDoc
.
select_include
:
Str
,
Str
->
IncludeSelection
AsciiDoc
.
select_include_with
:
Str
,
Str
,
IncludeContext
->
IncludeSelection
AsciiDoc
.
Lints
:= { unexpanded_includes :
Bool
?? True }
AsciiDoc
.
ValidationProps
:= { source :
Str
, name :
Str
?? "<literal>", lints :
Lints
?? {}, includes :
List
({ path :
Str
, source :
Str
}) ?? [], attributes :
List
(
Attribute
) ?? [], max_depth :
U64
?? 16, expand_includes :
Bool
?? False }
AsciiDoc
.
Document
: { title :
Str
, blocks :
List
(
Block
) }
AsciiDoc
.
Attribute
: { name :
Str
, value :
Str
}
AsciiDoc
.
Attributes
:
Attributes
AsciiDoc
.
Block
:= [
Paragraph
(
Str
),
Section
({ level :
U64
, title :
Str
, blocks :
List
(
Block
) }),
Listing
(
Str
),
Literal
(
Str
),
ThematicBreak
,
Rich
({ context :
Str
, source :
Str
, title :
Str
, style :
Str
, id :
Str
, attrs :
Attributes
, blocks :
List
(
Block
), level :
U64
})]
AsciiDoc.Block
.
is_eq
: _
AsciiDoc
.
Error
: { offset :
U64
, line :
U64
, message :
Str
}
AsciiDoc
.
Options
: { includes :
List
({ path :
Str
, source :
Str
}), attributes :
List
(
Attribute
), max_depth :
U64
, expand_includes :
Bool
}
AsciiDoc
.
IncludeSelection
: { text :
Str
, lines :
List
(
U64
), problems :
List
(
IncludeProblem
) }
AsciiDoc
.
IncludeProblem
: [
MissingTag
(
Str
),
UnclosedTag
(
Str
),
UnmatchedEnd
(
Str
),
InvalidLines
(
Str
),
EmptySelection
]
AsciiDoc
.
IncludeContext
:= { tabsize :
U64
?? 0 }
CSV
CSV
.
is_eq
: _
CSV
.
to_hash
: _
CSV
.
from_quote
:
Str
->
Try
(
CSV
, [
BadQuotedBytes
(
Str
)])
CSV
.
validate
:
ValidationProps
->
Try
(
List
(
Record
), [
BadQuotedBytes
(
Str
)])
CSV
.
validate_as
:
DecodeValidationProps
->
Try
(
List
(
row
), [
BadQuotedBytes
(
Str
)])
where
[
row
.
Parseable
([
InvalidCsv
(
Error
), ..
errs
])]
CSV
.
parse_records
:
Str
->
Try
(
List
(
Record
), [
InvalidCsv
(
Error
)])
CSV
.
parser
:
Parser
(
Bytes
,
List
(
Record
))
CSV
.
split_header
:
List
(
Record
)
->
{ header :
List
(
Str
), rows :
List
(
Record
) }
CSV
.
parse_with
:
Parser
(
Record
,
a
),
Str
->
Try
(
List
(
a
), [
InvalidCsv
(
Error
)])
CSV
.
decode
:
Parser
(
Record
,
a
),
List
(
Record
)
->
Try
(
List
(
a
), [
InvalidCsv
(
Error
)])
CSV
.
record
:
a
->
Parser
(
Record
,
a
)
CSV
.
field
:
Parser
(
Bytes
,
a
)
->
Parser
(
Record
,
a
)
CSV
.
string
:
Parser
(
Bytes
,
Str
)
CSV
.
u64
:
Parser
(
Bytes
,
U64
)
CSV
.
f64
:
Parser
(
Bytes
,
F64
)
CSV
.
parse
:
Str
->
Try
(
List
(
row
), [
InvalidCsv
(
Error
), ..
errs
])
where
[
row
.
Parseable
([
InvalidCsv
(
Error
), ..
errs
])]
CSV
.
parse_normalized
:
Str
->
Try
(
List
(
row
), [
InvalidCsv
(
Error
), ..
errs
])
where
[
row
.
Parseable
([
InvalidCsv
(
Error
), ..
errs
])]
CSV
.
parse_headerless
:
Str
->
Try
(
List
(
row
), [
InvalidCsv
(
Error
), ..
errs
])
where
[
row
.
Parseable
([
InvalidCsv
(
Error
), ..
errs
])]
CSV
.
Record
:
List
(
List
(
U8
))
CSV
.
Error
: { record :
U64
, field :
U64
, line :
U64
, column :
U64
, message :
Str
}
CSV
.
HeaderMode
: [
Absent
,
Exact
,
Normalized
]
CSV
.
Lints
:= { duplicate_headers :
Bool
?? True, empty_headers :
Bool
?? True }
CSV
.
ValidationProps
:= { source :
Str
, name :
Str
?? "<literal>", header :
HeaderMode
?? Absent, lints :
Lints
?? {} }
CSV
.
DecodeValidationProps
:= { source :
Str
, name :
Str
?? "<literal>", header :
HeaderMode
?? Exact, lints :
Lints
?? {} }
CSV
.
Decoded
:= { value :
List
(
row
) }
CSV.Decoded
.
from_quote
:
Str
->
Try
(
Decoded
(
row
), [
BadQuotedBytes
(
Str
)])
where
[
row
.
Parseable
([
InvalidCsv
(
Error
), ..
errs
])]
CSV
.
Parseable
:
row
where
[
row
.parser_for :
Format
->
(
State
->
Try
({ value :
row
, rest :
State
},
errs
))]
CSV
.
Format
CSV.Format
.
rename_field
:
Format
,
Str
->
Str
CSV.Format
.
parse_str
:
Format
,
State
->
Try
({ value :
Str
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_bool
:
Format
,
State
->
Try
({ value :
Bool
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_u8
:
Format
,
State
->
Try
({ value :
U8
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_i8
:
Format
,
State
->
Try
({ value :
I8
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_u16
:
Format
,
State
->
Try
({ value :
U16
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_i16
:
Format
,
State
->
Try
({ value :
I16
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_u32
:
Format
,
State
->
Try
({ value :
U32
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_i32
:
Format
,
State
->
Try
({ value :
I32
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_u64
:
Format
,
State
->
Try
({ value :
U64
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_i64
:
Format
,
State
->
Try
({ value :
I64
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_u128
:
Format
,
State
->
Try
({ value :
U128
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_i128
:
Format
,
State
->
Try
({ value :
I128
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_dec
:
Format
,
State
->
Try
({ value :
Dec
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_f32
:
Format
,
State
->
Try
({ value :
F32
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_f64
:
Format
,
State
->
Try
({ value :
F64
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_null
:
Format
,
State
->
Try
(
State
, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_record_start
:
Format
,
State
->
Try
([
Counted
({ len :
U64
, rest :
State
}),
Uncounted
(
State
)], [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_record_field
:
Format
,
FieldNames
(
_shape
),
State
->
Try
([
Field
({ field :
FieldName
(
_shape
), rest :
State
}),
TryField
({ name :
Str
, rest :
State
}),
TryFieldCaseless
({ name :
Str
, rest :
State
}),
Continue
(
State
),
Done
(
State
)], [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_record_after_field
:
Format
,
State
->
Try
([
Continue
(
State
),
Done
(
State
)], [
InvalidCsv
(
Error
)])
CSV.Format
.
skip_record_field
:
Format
,
State
->
Try
(
State
, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_tuple_start
:
Format
,
State
,
U64
->
Try
(
State
, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_tuple_next
:
Format
,
State
,
U64
,
U64
->
Try
(
State
, [
InvalidCsv
(
Error
)])
CSV.Format
.
invalid_value
:
Format
,
State
->
[
InvalidCsv
(
Error
)]
CSV.Format
.
parse_tuple_end
:
Format
,
State
,
U64
->
Try
(
State
, [
InvalidCsv
(
Error
)])
CSV.Format
.
parse_tag_union
:
Format
,
ParseTagUnionSpec
(
a
),
State
->
Try
({ value :
a
, rest :
State
}, [
InvalidCsv
(
Error
)])
CSV
.
State
HTTP
HTTP
.
validate_request
:
ValidationProps
->
Try
(
Request
, [
BadQuotedBytes
(
Str
)])
HTTP
.
validate_response
:
ValidationProps
->
Try
(
Response
, [
BadQuotedBytes
(
Str
)])
HTTP
.
header
:
List
(
Header
),
Str
->
Try
(
Str
, [
Missing
])
HTTP
.
parse_request
:
List
(
U8
)
->
Try
({ request :
Request
, rest :
List
(
U8
) }, [
InvalidHttp
(
Error
)])
HTTP
.
parse_response
:
List
(
U8
)
->
Try
({ response :
Response
, rest :
List
(
U8
) }, [
InvalidHttp
(
Error
)])
HTTP
.
parse_requests
:
List
(
U8
)
->
Try
(
List
(
Request
), [
InvalidHttp
(
Error
)])
HTTP
.
request
:
Parser
(
Bytes
,
Request
)
HTTP
.
response
:
Parser
(
Bytes
,
Response
)
HTTP
.
Lints
:= { repeated_content_length :
Bool
?? True }
HTTP
.
ValidationProps
:= { source :
Str
, name :
Str
?? "<literal>", lints :
Lints
?? {} }
HTTP
.
RequestLiteral
:= { value :
Request
}
HTTP.RequestLiteral
.
from_quote
:
Str
->
Try
(
RequestLiteral
, [
BadQuotedBytes
(
Str
)])
HTTP
.
ResponseLiteral
:= { value :
Response
}
HTTP.ResponseLiteral
.
from_quote
:
Str
->
Try
(
ResponseLiteral
, [
BadQuotedBytes
(
Str
)])
HTTP
.
Method
: [
Options
,
Get
,
Post
,
Put
,
Delete
,
Head
,
Trace
,
Connect
,
Patch
,
Extension
(
Str
)]
HTTP
.
Version
: { major :
U8
, minor :
U8
}
HTTP
.
Header
: { name :
Str
, value :
Str
}
HTTP
.
Request
: { method :
Method
, target :
Str
, version :
Version
, headers :
List
(
Header
), body :
List
(
U8
) }
HTTP
.
Response
: { version :
Version
, status_code :
U16
, reason :
Str
, headers :
List
(
Header
), body :
List
(
U8
) }
HTTP
.
Error
: { offset :
U64
, message :
Str
}
JsonValue
JsonValue
.
is_eq
: _
JsonValue
.
to_hash
: _
JsonValue
.
validate
:
ValidationProps
->
Try
(
JsonValue
, [
BadQuotedBytes
(
Str
)])
JsonValue
.
from_quote
:
Str
->
Try
(
JsonValue
, [
BadQuotedBytes
(
Str
)])
JsonValue
.
parse_str
:
Str
->
Try
(
JsonValue
, [
InvalidJsonValue
(
Error
)])
JsonValue
.
parse_with
:
Str
,
Options
->
Try
(
JsonValue
, [
InvalidJsonValue
(
Error
)])
JsonValue
.
parser
:
Parser
(
Bytes
,
JsonValue
)
JsonValue
.
parser_with
:
Options
->
Parser
(
Bytes
,
JsonValue
)
JsonValue
.
get
:
JsonValue
,
Str
->
Try
(
JsonValue
, [
Missing
])
JsonValue
.
at
:
JsonValue
,
U64
->
Try
(
JsonValue
, [
Missing
])
JsonValue
.
get_path
:
JsonValue
,
List
(
Str
)
->
Try
(
JsonValue
, [
Missing
])
JsonValue
.
keys
:
JsonValue
->
List
(
Str
)
JsonValue
.
as_str
:
JsonValue
->
Try
(
Str
, [
WrongType
])
JsonValue
.
as_bool
:
JsonValue
->
Try
(
Bool
, [
WrongType
])
JsonValue
.
as_list
:
JsonValue
->
Try
(
List
(
JsonValue
), [
WrongType
])
JsonValue
.
as_object
:
JsonValue
->
Try
(
List
({ key :
Str
, value :
JsonValue
}), [
WrongType
])
JsonValue
.
as_i64
:
JsonValue
->
Try
(
I64
, [
WrongType
,
OutOfRange
])
JsonValue
.
as_u64
:
JsonValue
->
Try
(
U64
, [
WrongType
,
OutOfRange
])
JsonValue
.
as_dec
:
JsonValue
->
Try
(
Dec
, [
WrongType
,
OutOfRange
])
JsonValue
.
to_str
:
JsonValue
->
Try
(
Str
, [
InvalidNumber
(
Str
),
DuplicateKey
(
Str
),
TooDeep
,
TooLarge
(
U64
)])
JsonValue
.
to_str_with
:
JsonValue
,
WriteOptions
->
Try
(
Str
, [
InvalidNumber
(
Str
),
DuplicateKey
(
Str
),
TooDeep
,
TooLarge
(
U64
)])
JsonValue
.
Error
: { line :
U64
, column :
U64
, message :
Str
}
JsonValue
.
Options
:= { max_bytes :
U64
?? U64.highest, max_depth :
U64
?? 128, max_items :
U64
?? U64.highest, max_string_bytes :
U64
?? U64.highest, max_number_digits :
U64
?? U64.highest, comments :
Bool
?? False, trailing_commas :
Bool
?? False, bom :
Bool
?? False, non_finite :
Bool
?? False, control_characters :
Bool
?? False, lone_surrogates : [
Reject
,
Replace
] ?? Reject, duplicates : [
Reject
,
CollapseIdentical
,
KeepFirst
,
KeepLast
] ?? Reject, top_level : [
Any
,
ObjectOrArray
,
Object
] ?? Any, interoperable_numbers :
Bool
?? False }
JsonValue
.
ValidationProps
:= { source :
Str
, name :
Str
?? "<literal>", options :
Options
?? {} }
JsonValue
.
WriteOptions
:= { sort_keys :
Bool
?? False, indent :
U64
?? 0, max_bytes :
U64
?? U64.highest }
Literal
Literal
.
require
:
Try
(
a
, [
BadQuotedBytes
(
Str
)])
->
a
Literal
.
error
:
ErrorProps
->
[
BadQuotedBytes
(
Str
)]
Literal
.
position
:
Str
,
U64
->
{ line :
U64
, column :
U64
}
Literal
.
ErrorProps
:= { name :
Str
?? "<literal>", format :
Str
, message :
Str
, line :
U64
?? 0, column :
U64
?? 0 }
Markdown
Markdown
.
to_inspect
:
Markdown
->
Str
Markdown
.
is_eq
: _
Markdown
.
validate
:
ValidationProps
->
Try
(
List
(
Markdown
), [
BadQuotedBytes
(
Str
)])
Markdown
.
to_hash
: _
Markdown
.
parse_str
:
Str
->
List
(
Markdown
)
Markdown
.
parse_inlines
:
Str
->
List
(
Inline
)
Markdown
.
parser
:
Parser
(
Bytes
,
List
(
Markdown
))
Markdown
.
inline_parser
:
Parser
(
Bytes
,
List
(
Inline
))
Markdown
.
frontmatter
:
List
(
Markdown
)
->
Try
(
Str
, [
Missing
])
Markdown
.
Lints
:= { unclosed_fences :
Bool
?? True }
Markdown
.
ValidationProps
:= { source :
Str
, name :
Str
?? "<literal>", lints :
Lints
?? {} }
Markdown
.
Document
:= { blocks :
List
(
Markdown
) }
Markdown.Document
.
from_quote
:
Str
->
Try
(
Document
, [
BadQuotedBytes
(
Str
)])
Markdown
.
Level
:= [
One
,
Two
,
Three
,
Four
,
Five
,
Six
]
Markdown.Level
.
to_inspect
:
Level
->
Str
Markdown.Level
.
to_str
:
Level
->
Str
Markdown.Level
.
is_eq
: _
Markdown.Level
.
to_hash
: _
Markdown
.
ListKind
:= [
Unordered
,
Ordered
({ start :
U64
})]
Markdown.ListKind
.
to_inspect
:
ListKind
->
Str
Markdown.ListKind
.
to_str
:
ListKind
->
Str
Markdown.ListKind
.
is_eq
: _
Markdown.ListKind
.
to_hash
: _
Markdown
.
TaskState
:= [
NoTask
,
Unchecked
,
Checked
]
Markdown.TaskState
.
to_inspect
:
TaskState
->
Str
Markdown.TaskState
.
to_str
:
TaskState
->
Str
Markdown.TaskState
.
is_eq
: _
Markdown.TaskState
.
to_hash
: _
Markdown
.
Alignment
:= [
Default
,
Left
,
Center
,
Right
]
Markdown.Alignment
.
to_inspect
:
Alignment
->
Str
Markdown.Alignment
.
to_str
:
Alignment
->
Str
Markdown.Alignment
.
is_eq
: _
Markdown.Alignment
.
to_hash
: _
Markdown
.
LinkTarget
: { href :
Str
, title :
Try
(
Str
, [
Missing
]) }
Markdown
.
Inline
:= [
Text
(
Str
),
Strong
(
List
(
Inline
)),
Emphasis
(
List
(
Inline
)),
Strikethrough
(
List
(
Inline
)),
InlineCode
(
Str
),
Link
({ label :
List
(
Inline
), target :
LinkTarget
}),
Image
({ alt :
List
(
Inline
), target :
LinkTarget
}),
HardBreak
,
HtmlInline
(
Str
)]
Markdown.Inline
.
to_inspect
:
Inline
->
Str
Markdown.Inline
.
is_eq
: _
Markdown.Inline
.
to_hash
: _
Parser
Parser
.
custom
: (
input
->
ParseResult
(
input
,
a
))
->
Parser
(
input
,
a
)
where
[
input
.len :
input
->
U64
]
Parser
.
run
:
Parser
(
input
,
a
),
input
->
ParseResult
(
input
,
a
)
where
[
input
.len :
input
->
U64
]
Parser
.
parse
:
Parser
(
input
,
a
),
input
->
Try
(
a
, [
ParseError
({ message :
Str
, offset :
U64
})])
where
[
input
.len :
input
->
U64
]
Parser
.
fail
:
Str
->
Parser
(
input
,
a
)
where
[
input
.len :
input
->
U64
]
Parser
.
const
:
a
->
Parser
(_,
a
)
Parser
.
alt
:
Parser
(
input
,
a
),
Parser
(
input
,
a
)
->
Parser
(
input
,
a
)
Parser
.
one_of
:
List
(
Parser
(
input
,
a
))
->
Parser
(
input
,
a
)
where
[
input
.len :
input
->
U64
]
Parser
.
map
:
Parser
(
input
,
a
), (
a
->
b
)
->
Parser
(
input
,
b
)
Parser
.
map2
:
Parser
(
input
,
a
),
Parser
(
input
,
b
), (
a
,
b
->
c
)
->
Parser
(
input
,
c
)
Parser
.
map3
:
Parser
(
input
,
a
),
Parser
(
input
,
b
),
Parser
(
input
,
c
), (
a
,
b
,
c
->
d
)
->
Parser
(
input
,
d
)
Parser
.
flatten
:
Parser
(
input
,
Try
(
a
,
Str
))
->
Parser
(
input
,
a
)
where
[
input
.len :
input
->
U64
]
Parser
.
and_then
:
Parser
(
input
,
a
), (
a
->
Parser
(
input
,
b
))
->
Parser
(
input
,
b
)
Parser
.
lazy
: ({}
->
Parser
(
input
,
a
))
->
Parser
(
input
,
a
)
Parser
.
maybe
:
Parser
(
input
,
a
)
->
Parser
(
input
,
Try
(
a
, [
Missing
]))
Parser
.
many
:
Parser
(
input
,
a
)
->
Parser
(
input
,
List
(
a
))
where
[
input
.len :
input
->
U64
]
Parser
.
one_or_more
:
Parser
(
input
,
a
)
->
Parser
(
input
,
List
(
a
))
where
[
input
.len :
input
->
U64
]
Parser
.
between
:
Parser
(
input
,
a
),
Parser
(
input
,
open
),
Parser
(
input
,
close
)
->
Parser
(
input
,
a
)
Parser
.
sep_by_one_or_more
:
Parser
(
input
,
a
),
Parser
(
input
,
sep
)
->
Parser
(
input
,
List
(
a
))
where
[
input
.len :
input
->
U64
]
Parser
.
sep_by
:
Parser
(
input
,
a
),
Parser
(
input
,
sep
)
->
Parser
(
input
,
List
(
a
))
where
[
input
.len :
input
->
U64
]
Parser
.
ignore
:
Parser
(
input
,
a
)
->
Parser
(
input
, {})
Parser
.
keep
:
Parser
(
input
,
a
->
b
),
Parser
(
input
,
a
)
->
Parser
(
input
,
b
)
Parser
.
skip
:
Parser
(
input
,
a
),
Parser
(
input
, _)
->
Parser
(
input
,
a
)
Parser
.
chomp_until
:
a
->
Parser
(
List
(
a
),
List
(
a
))
where
[
a
.is_eq :
a
,
a
->
Bool
]
Parser
.
chomp_while
: (
a
->
Bool
)
->
Parser
(
List
(
a
),
List
(
a
))
Parser
.
span
:
Parser
(
List
(
item
),
a
)
->
Parser
(
List
(
item
),
List
(
item
))
Parser
.
ParseResult
:
Try
({ value :
a
, rest :
input
}, [
ParseError
({ message :
Str
, offset :
U64
})])
RocSyntax
RocSyntax
.
from_quote
:
Str
->
Try
(
RocSyntax
, [
BadQuotedBytes
(
Str
)])
RocSyntax
.
validate
:
ValidateProps
->
Try
(
Parsed
, [
BadQuotedBytes
(
Str
)])
RocSyntax
.
tokenize_bytes
:
List
(
U8
)
->
Tokenized
RocSyntax
.
tokenize_str
:
Str
->
Tokenized
RocSyntax
.
highlight_category
:
TokenKind
->
HighlightCategory
RocSyntax
.
parse_str
:
Str
->
Parsed
RocSyntax
.
parse_bytes
:
List
(
U8
)
->
Parsed
RocSyntax
.
parse_expression
:
Str
->
Parsed
RocSyntax
.
parse_expr_str
:
Str
->
Parsed
RocSyntax
.
parse_expr_bytes
:
List
(
U8
)
->
Parsed
RocSyntax
.
parse_statement_str
:
Str
->
Parsed
RocSyntax
.
parse_header_str
:
Str
->
Parsed
RocSyntax
.
Span
: { start :
U64
, end :
U64
}
RocSyntax
.
TokenKind
: [
Whitespace
,
Comment
,
LowerIdent
,
UpperIdent
,
Keyword
,
Number
,
StringStart
,
MultilineStringStart
,
StringPart
,
StringEnd
,
InterpolationStart
,
InterpolationEnd
,
SingleQuote
,
OpenRound
,
NoSpaceOpenRound
,
CloseRound
,
OpenSquare
,
CloseSquare
,
OpenCurly
,
CloseCurly
,
Operator
,
Punctuation
,
Invalid
,
EndOfFile
]
RocSyntax
.
Token
: { kind :
TokenKind
, start :
U64
, end :
U64
}
RocSyntax
.
NodeKind
: [
File
,
Declaration
,
VariableDeclaration
,
Expect
,
For
,
ForStream
,
While
,
ExpressionStatement
,
Lambda
,
If
,
Match
,
MatchBranch
,
Pattern
,
IdentifierPattern
,
WildcardPattern
,
PatternStringLiteral
,
CapturePattern
,
MutablePattern
,
TagPattern
,
NominalPattern
,
TuplePattern
,
ListPattern
,
RecordPattern
,
PatternField
,
RestPattern
,
AliasPattern
,
AlternativePattern
,
Block
,
Record
,
RecordUpdate
,
UnsetField
,
RecordBuilder
,
NominalRecord
,
NominalApply
,
RecordField
,
Header
,
Dependencies
,
DependencyField
,
PlatformReference
,
Import
,
FileImport
,
ImportPath
,
ImportAlias
,
ExposedItem
,
ExposedWildcard
,
TypeAnnotation
,
TypeExpression
,
Identifier
,
NumberLiteral
,
StringLiteral
,
MultilineStringLiteral
,
StringSegment
,
Interpolation
,
TypedLiteral
,
ArrowCall
,
MethodArrowCall
,
CharacterLiteral
,
Unary
,
Binary
,
Call
,
FieldAccess
,
OptionalFieldAccess
,
Suffix
,
Debug
,
Crash
,
Return
,
Break
,
Ellipsis
,
ListLiteral
,
Tuple
,
Parenthesized
,
ErrorNode
,
UnsupportedNode
,
TypeName
,
TypeVariable
,
TypeWildcard
,
TypeApply
,
TypeFunction
,
TypeTuple
,
TypeRecord
,
TypeField
,
TypeTagUnion
,
TypeExtension
,
TypeParenthesized
,
TypeDeclaration
,
TypeHeader
,
WhereClause
,
WhereMethod
,
WhereAlias
,
AssociatedBlock
,
PlatformRequires
,
RequiredValue
,
RequiredType
,
PlatformProvides
,
PlatformHosted
,
SymbolMapping
,
PlatformTargets
,
TargetInputsDirectory
,
TargetEntry
,
TargetConfig
,
TargetField
,
TargetList
,
TargetFile
]
RocSyntax
.
Node
: { kind :
NodeKind
, start :
U64
, end :
U64
, children_start :
U64
, children_len :
U64
}
RocSyntax
.
DiagnosticCode
: [
InvalidByte
,
InvalidUtf8
,
BidiControlInSource
,
Utf8ByteOrderMark
,
UnclosedString
,
UnclosedDelimiter
,
UnexpectedToken
,
InvalidNumber
,
InvalidEscape
,
InvalidCharacter
,
UnsupportedSyntax
,
ResourceLimit
]
RocSyntax
.
Diagnostic
: { code :
DiagnosticCode
, start :
U64
, end :
U64
}
RocSyntax
.
Status
: [
Complete
,
Recovered
,
Unsupported
,
Limited
]
RocSyntax
.
Parsed
: { source :
List
(
U8
), tokens :
List
(
Token
), nodes :
List
(
Node
), children :
List
(
U64
), diagnostics :
List
(
Diagnostic
), status :
Status
, root :
U64
, consumed :
Bool
}
RocSyntax
.
LintProps
:= { placeholders :
Bool
?? True }
RocSyntax
.
ValidateProps
:= { source :
Str
, name :
Str
?? "<literal>", lints :
LintProps
?? {} }
RocSyntax
.
Tokenized
: { source :
List
(
U8
), tokens :
List
(
Token
), diagnostics :
List
(
Diagnostic
), status :
Status
}
RocSyntax
.
HighlightCategory
: [
Trivia
,
CommentText
,
Name
,
TypeName
,
ReservedWord
,
NumericLiteral
,
StringText
,
Symbol
,
InvalidText
]
Utf8
Utf8
.
parse_quote
:
QuoteProps
(
a
)
->
Try
(
a
, [
BadQuotedBytes
(
Str
)])
Utf8
.
parse_str
:
Parser
(
Bytes
,
a
),
Str
->
Try
(
a
, [
ParseError
({ message :
Str
, offset :
U64
})])
Utf8
.
parse_str_partial
:
Parser
(
Bytes
,
a
),
Str
->
Try
({ value :
a
, rest :
Str
}, [
ParseError
({ message :
Str
, offset :
U64
})])
Utf8
.
parse_bytes
:
Parser
(
Bytes
,
a
),
Bytes
->
Try
(
a
, [
ParseError
({ message :
Str
, offset :
U64
})])
Utf8
.
parse_bytes_partial
:
Parser
(
Bytes
,
a
),
Bytes
->
Try
({ value :
a
, rest :
Bytes
}, [
ParseError
({ message :
Str
, offset :
U64
})])
Utf8
.
codeunit_satisfies
: (
U8
->
Bool
)
->
Parser
(
Bytes
,
U8
)
Utf8
.
codeunit
:
U8
->
Parser
(
Bytes
,
U8
)
Utf8
.
utf8
:
List
(
U8
)
->
Parser
(
Bytes
,
List
(
U8
))
Utf8
.
string
:
Str
->
Parser
(
Bytes
,
Str
)
Utf8
.
any_codeunit
:
Parser
(
Bytes
,
U8
)
Utf8
.
rest
:
Parser
(
Bytes
,
Bytes
)
Utf8
.
rest_str
:
Parser
(
Bytes
,
Str
)
Utf8
.
digit
:
Parser
(
Bytes
,
U64
)
Utf8
.
digits
:
Parser
(
Bytes
,
U64
)
Utf8
.
find_any
:
Bytes
,
U64
,
ByteClass
->
U64
Utf8
.
skip_class
:
Bytes
,
U64
,
ByteClass
->
U64
Utf8
.
find_line_end
:
Bytes
,
U64
->
U64
Utf8
.
span_class
:
ByteClass
->
Parser
(
Bytes
,
Bytes
)
Utf8
.
Bytes
:
List
(
U8
)
Utf8
.
QuoteProps
:= { parser :
Parser
(
Bytes
,
a
), source :
Str
, name :
Str
?? "<literal>" }
Utf8
.
ByteClass
Utf8.ByteClass
.
from_bytes
:
List
(
U8
)
->
ByteClass
Utf8.ByteClass
.
from_predicate
: (
U8
->
Bool
)
->
ByteClass
Utf8.ByteClass
.
complement
:
ByteClass
->
ByteClass
Utf8.ByteClass
.
contains
:
ByteClass
,
U8
->
Bool
Xml
Xml
.
is_eq
: _
Xml
.
to_hash
: _
Xml
.
validate
:
ValidationProps
->
Try
(
Xml
, [
BadQuotedBytes
(
Str
)])
Xml
.
from_quote
:
Str
->
Try
(
Xml
, [
BadQuotedBytes
(
Str
)])
Xml
.
parse_str
:
Str
->
Try
(
Xml
, [
InvalidXml
(
Error
)])
Xml
.
parser
:
Parser
(
Bytes
,
Xml
)
Xml
.
Lints
:= { non_utf8_declaration :
Bool
?? True }
Xml
.
ValidationProps
:= { source :
Str
, name :
Str
?? "<literal>", lints :
Lints
?? {} }
Xml
.
Attribute
: { name :
Str
, value :
Str
}
Xml
.
TextEncoding
: [
Utf8Encoding
,
OtherEncoding
(
Str
)]
Xml
.
Declaration
: { version :
Version
, encoding :
Try
(
TextEncoding
, [
Missing
]) }
Xml
.
Version
: { major :
U64
, minor :
U64
}
Xml
.
Node
:= [
Element
({ name :
Str
, attributes :
List
(
Attribute
), children :
List
(
Node
) }),
Text
(
Str
)]
Xml.Node
.
is_eq
: _
Xml.Node
.
to_hash
: _
Xml.Node
.
name
:
Node
->
Try
(
Str
, [
NotAnElement
])
Xml.Node
.
attribute
:
Node
,
Str
->
Try
(
Str
, [
Missing
])
Xml.Node
.
children_named
:
Node
,
Str
->
List
(
Node
)
Xml.Node
.
text
:
Node
->
Str
Xml
.
Error
: { line :
U64
, column :
U64
, message :
Str
}
Yaml
Yaml
.
tokenize_str
:
Str
->
Tokenized
Yaml
.
tokenize_bytes
:
List
(
U8
)
->
Tokenized
Yaml
.
highlight_category
:
Token
->
HighlightCategory
Yaml
.
is_eq
: _
Yaml
.
to_hash
: _
Yaml
.
from_quote
:
Str
->
Try
(
Yaml
, [
BadQuotedBytes
(
Str
)])
Yaml
.
validate
:
ValidationProps
->
Try
(
Yaml
, [
BadQuotedBytes
(
Str
)])
Yaml
.
validate_as
:
DecodeValidationProps
->
Try
(
a
, [
BadQuotedBytes
(
Str
)])
where
[
a
.
Parseable
([
InvalidYaml
(
Error
), ..
errs
])]
Yaml
.
parse_str
:
Str
->
Try
(
Yaml
, [
InvalidYaml
(
Error
)])
Yaml
.
parser
:
Parser
(
Bytes
,
Yaml
)
Yaml
.
get
:
Yaml
,
Str
->
Try
(
Yaml
, [
Missing
])
Yaml
.
at
:
Yaml
,
U64
->
Try
(
Yaml
, [
Missing
])
Yaml
.
get_path
:
Yaml
,
List
(
Str
)
->
Try
(
Yaml
, [
Missing
])
Yaml
.
as_str
:
Yaml
->
Try
(
Str
, [
WrongType
])
Yaml
.
as_i64
:
Yaml
->
Try
(
I64
, [
WrongType
])
Yaml
.
as_bool
:
Yaml
->
Try
(
Bool
, [
WrongType
])
Yaml
.
as_list
:
Yaml
->
Try
(
List
(
Yaml
), [
WrongType
])
Yaml
.
to_inspect
:
Yaml
->
Str
Yaml
.
decode
:
Str
->
Try
(
a
, [
InvalidYaml
(
Error
), ..
errs
])
where
[
a
.
Parseable
([
InvalidYaml
(
Error
), ..
errs
])]
Yaml
.
decoder
:
DecodeOptions
->
(
Str
->
Try
(
a
, [
InvalidYaml
(
Error
), ..
errs
]))
where
[
a
.
Parseable
([
InvalidYaml
(
Error
), ..
errs
])]
Yaml
.
Error
: { line :
U64
, column :
U64
, message :
Str
}
Yaml
.
Span
: { start :
U64
, end :
U64
}
Yaml
.
TokenKind
: [
Whitespace
,
Comment
,
PlainScalar
,
SingleQuotedScalar
,
DoubleQuotedScalar
,
MappingValue
,
SequenceEntry
,
ExplicitKey
,
FlowSequenceStart
,
FlowSequenceEnd
,
FlowMappingStart
,
FlowMappingEnd
,
FlowEntry
,
BlockScalarHeader
,
BlockScalarContent
,
Anchor
,
Alias
,
Tag
,
Directive
,
DocumentStart
,
DocumentEnd
,
Invalid
]
Yaml
.
TokenRole
: [
Key
,
Value
,
Other
]
Yaml
.
ScalarCategory
: [
Text
,
Boolean
,
Null
,
Number
]
Yaml
.
Token
: { kind :
TokenKind
, start :
U64
, end :
U64
, role :
TokenRole
, scalar :
ScalarCategory
}
Yaml
.
DiagnosticCode
: [
UnclosedQuote
,
InvalidEscape
,
UnclosedCollection
,
UnexpectedDelimiter
,
InvalidIndentation
,
InvalidBlockHeader
,
InvalidCharacter
,
InvalidUtf8
,
ResourceLimit
]
Yaml
.
Diagnostic
: { code :
DiagnosticCode
, start :
U64
, end :
U64
}
Yaml
.
TokenStatus
: [
Complete
,
Recovered
,
Limited
]
Yaml
.
Tokenized
: { source :
List
(
U8
), tokens :
List
(
Token
), diagnostics :
List
(
Diagnostic
), status :
TokenStatus
}
Yaml
.
HighlightCategory
: [
Trivia
,
CommentText
,
PropertyName
,
StringText
,
NumericLiteral
,
BooleanLiteral
,
NullLiteral
,
Symbol
,
Name
,
TypeName
,
InvalidText
]
Yaml
.
Lints
:= { legacy_booleans :
Bool
?? True }
Yaml
.
ValidationProps
:= { source :
Str
, name :
Str
?? "<literal>", lints :
Lints
?? {} }
Yaml
.
DecodeValidationProps
:= { source :
Str
, name :
Str
?? "<literal>", lints :
Lints
?? {}, keys : [
SnakeCase
,
KebabCase
,
CamelCase
] ?? SnakeCase, unknown_keys : [
Skip
,
Reject
] ?? Skip }
Yaml
.
Decoded
:= { value :
a
}
Yaml.Decoded
.
from_quote
:
Str
->
Try
(
Decoded
(
a
), [
BadQuotedBytes
(
Str
)])
where
[
a
.
Parseable
([
InvalidYaml
(
Error
), ..
errs
])]
Yaml
.
DecodeOptions
: { keys : [
SnakeCase
,
KebabCase
,
CamelCase
], unknown_keys : [
Skip
,
Reject
] }
Yaml
.
Parseable
:
a
where
[
a
.parser_for :
Format
->
(
Cursor
->
Try
({ value :
a
, rest :
Cursor
},
errs
))]
Yaml
.
Format
Yaml.Format
.
rename_field
:
Format
,
Str
->
Str
Yaml.Format
.
parse_str
:
Format
,
Cursor
->
Try
({ value :
Str
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_bool
:
Format
,
Cursor
->
Try
({ value :
Bool
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_u8
:
Format
,
Cursor
->
Try
({ value :
U8
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_i8
:
Format
,
Cursor
->
Try
({ value :
I8
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_u16
:
Format
,
Cursor
->
Try
({ value :
U16
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_i16
:
Format
,
Cursor
->
Try
({ value :
I16
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_u32
:
Format
,
Cursor
->
Try
({ value :
U32
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_i32
:
Format
,
Cursor
->
Try
({ value :
I32
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_u64
:
Format
,
Cursor
->
Try
({ value :
U64
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_i64
:
Format
,
Cursor
->
Try
({ value :
I64
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_u128
:
Format
,
Cursor
->
Try
({ value :
U128
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_i128
:
Format
,
Cursor
->
Try
({ value :
I128
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_dec
:
Format
,
Cursor
->
Try
({ value :
Dec
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_f32
:
Format
,
Cursor
->
Try
({ value :
F32
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_f64
:
Format
,
Cursor
->
Try
({ value :
F64
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_null
:
Format
,
Cursor
->
Try
(
Cursor
, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_tag_union
:
Format
,
ParseTagUnionSpec
(
a
),
Cursor
->
Try
({ value :
a
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_list_start
:
Format
,
Cursor
->
Try
([
Counted
({ len :
U64
, rest :
Cursor
}),
Uncounted
(
Cursor
)], [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_list_next
:
Format
,
Cursor
->
Try
([
Item
(
Cursor
),
Done
(
Cursor
)], [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_list_after_item
:
Format
,
Cursor
->
Try
([
Continue
(
Cursor
),
Done
(
Cursor
)], [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_tuple_start
:
Format
,
Cursor
,
U64
->
Try
(
Cursor
, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_tuple_next
:
Format
,
Cursor
,
U64
,
U64
->
Try
(
Cursor
, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_tuple_end
:
Format
,
Cursor
,
U64
->
Try
(
Cursor
, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_record_start
:
Format
,
Cursor
->
Try
([
Counted
({ len :
U64
, rest :
Cursor
}),
Uncounted
(
Cursor
)], [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_record_field
:
Format
,
FieldNames
(
_shape
),
Cursor
->
Try
([
Field
({ field :
FieldName
(
_shape
), rest :
Cursor
}),
TryField
({ name :
Str
, rest :
Cursor
}),
TryFieldCaseless
({ name :
Str
, rest :
Cursor
}),
Continue
(
Cursor
),
Done
(
Cursor
)], [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_record_after_field
:
Format
,
Cursor
->
Try
([
Continue
(
Cursor
),
Done
(
Cursor
)], [
InvalidYaml
(
Error
)])
Yaml.Format
.
skip_record_field
:
Format
,
Cursor
->
Try
(
Cursor
, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_dict_start
:
Format
,
Cursor
->
Try
([
Counted
({ len :
U64
, rest :
Cursor
}),
Uncounted
(
Cursor
)], [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_dict_next
:
Format
,
Cursor
->
Try
([
Entry
(
Cursor
),
Done
(
Cursor
)], [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_dict_after_key
:
Format
,
Cursor
->
Try
(
Cursor
, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_dict_after_entry
:
Format
,
Cursor
->
Try
([
Continue
(
Cursor
),
Done
(
Cursor
)], [
InvalidYaml
(
Error
)])
Yaml.Format
.
invalid_value
:
Format
,
Cursor
->
[
InvalidYaml
(
Error
)]
Yaml.Format
.
parse_key_str
:
Format
,
Cursor
->
Try
({ value :
Str
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_key_u8
:
Format
,
Cursor
->
Try
({ value :
U8
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_key_i8
:
Format
,
Cursor
->
Try
({ value :
I8
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_key_u16
:
Format
,
Cursor
->
Try
({ value :
U16
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_key_i16
:
Format
,
Cursor
->
Try
({ value :
I16
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_key_u32
:
Format
,
Cursor
->
Try
({ value :
U32
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_key_i32
:
Format
,
Cursor
->
Try
({ value :
I32
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_key_u64
:
Format
,
Cursor
->
Try
({ value :
U64
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml.Format
.
parse_key_i64
:
Format
,
Cursor
->
Try
({ value :
I64
, rest :
Cursor
}, [
InvalidYaml
(
Error
)])
Yaml
.
Cursor