Expand description
Clause source values (comprehension_forms.md §3.1).
A clause(name, source) binds a name to the values
produced by its source. Sources split into two families:
- Discrete stream producers — literal lists, integer
ranges, generator functions, workload-param references.
Cardinality is
Bounded,BoundedAtMost, orUnbounded. - Continuous measures — real intervals with an
integrable measure (uniform on bounded intervals; named
probability distributions like Normal / Exponential).
Cardinality is
Continuous; V8 requires an enclosing samplingorder(_, strategy, Some(n))before dispense.
Sources are stream producers — they do not pre-materialize
into Vec<Value>. This is the load-bearing model property
of comprehension_forms.md §3.1 and §6.2.
Enums§
- Literal
Value - A literal value carried in a
Source::Literal. Subset of the polydatValuetype — the kinds clauses can directly bind. Extension to richer value types lives in the source evaluator, not the AST. - Source
- A clause’s source of values.
Functions§
- all_
cursor_ argument - The cursor
textenumerates when it is the source formall(<cursor>), whitespace aside;Nonefor any other text. - cursor_
extent_ names - The auxiliary outputs a
cursor <name> = ...declaration compiles to, holding its extent:[start, end].all(<cursor>)reads these. - cursor_
of_ extent_ name - The cursor whose extent the output
nameholds, whennameis one ofcursor_extent_names. - split_
string_ comprehension - The string-comprehension separator rule (comprehension_forms.md
§3.1.3), in one place
so the parse-time (
source_parser) and runtime (eval) striping can never drift: split on runs of comma / semicolon / ASCII whitespace, trim, drop empties. Every other character (:.-/…) stays in the token. Returns the raw token substrings; callers type them (Value or LiteralValue).