Typed, serializable paths into an environment (Path<Env, A>).
Every Path<Env, A> is also an Expr<Env, A> (they share the same carrier
brand and node field), so paths drop straight into expressions while
Transition.set requires a path from the transition's state accessor.
Build a PathAccessor<Env, A> rooted at segments from an Effect Schema
AST so ({ row, principal }) => Num.lte(row.reserved, row.balance) yields
typed Path values with their field ASTs attached. With element, every
path reads that binder's element, and refuses to be used once its body
has returned.
Pure, terminating expression reading paths from Env and producing A.
Env is contravariant (phantom) so an expression over { row } widens into
{ row, principal } without adapters.
A path to field K of an element E, whose type holds the field's name: what
a field selector such as each => each.sku returns. The name lives only in
the type; at run time the path's one segment is the name.
Dot-joined form of a path (e.g. "row.balance", or "$" for root), one
text per path: a . or \ inside a segment is written \. or \\, and a
segment that is $ alone is written \$, so the field "a.b" is a\.b
and never the nested a.b. Readers that name a field by it (the solver's
variables, a witness's keys) rely on that.
Read the value at path from env, or Option.none() if any segment is
missing. A path built from a Schema reads the logical value: through an
Option to its value, or null for a none; a path made from raw segments
reads storage, an Option included.
True when prefix is a segment prefix of target (useful for cache and
surface invalidation). A * segment on either side matches any one
segment, so todos.* is a prefix of todos.3.title and of todos.*.title.
Recursive typed accessor for an environment value A: every plain object
property (including TypeScript interfaces) becomes a nested
PathAccessor<Env, A[K]>, and every level is itself a Path<Env, A>.
An Option reads as its value or null, and a field under a value that may
be null may be null too, as evaluation reads it.
A field named as a member of Path itself (node, segments, ast) is
not reached by its name, which reads the member: compose it,
Path.compose(parent, Path.field('segments')).
Constraint for a generic helper that both composes a Schema (Schema.Struct,
Schema.Array, Expr.refine) and decodes it synchronously
(Schema.decodeUnknownSync).
Pure structural update at path inside env. Returns a new object along
the updated spine; returns env untouched when the new value is Object.is
equal to the existing one.