PureYAML/Sources
Mihaela M 1915a00fde feat(validation): add the combinator algebra for checks
Add the declarative combinators the validation idiom composes rules from,
as free functions returning closures: comparison operators (==, !=, <, <=,
>, >=) lifting a key path and a literal into a predicate; take to dig to a
value and run arbitrary logic; all to apply many checks to one context; lift
to run child-typed checks against a value reached by key path; and && / ||
to compose two checks (concatenating their errors, or short-circuiting so
errors surface only when both fail). Both the context-rooted and
subject-rooted key-path forms are provided so an author can pin the subject
type in either clause.

A key path is immutable and read-safe but not declared Sendable, so a
@Sendable predicate captures it through a small @unchecked Sendable box.
lookup is omitted: it resolves references against a component store the
generic model does not carry; a consumer with references supplies it.

Each combinator has a pure-function test against a hand-built context, per
the idiom's requirement to unit test the operators in isolation.
2026-06-28 09:27:17 +02:00
..
Coding feat(codable): broaden compatibility coverage 2026-06-05 12:49:20 +02:00
Decoding feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Emitting feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Encoding feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Model feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Parsing fix(parsing): parse a bare document after a document-end marker 2026-06-28 04:23:06 +02:00
Stream feat(parser): add multi-document stream parsing 2026-06-05 14:55:54 +02:00
Tagged refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
Validation feat(validation): add the combinator algebra for checks 2026-06-28 09:27:17 +02:00
API.swift feat(emitting): dump YAML streams 2026-06-05 17:14:41 +02:00
PureYAML.swift feat(tagged): add tag-preserving validation 2026-06-05 15:35:52 +02:00