Expand description
Modules§
- deps
- Dependency layout under
<workdir>/lemma_deps/, shared by CLI fetch and LSP.
Structs§
- Cause
- Context
- Ordered store of specs keyed by
(repository, name)and grouped intoLemmaSpecSets. - Data
Entry - One data entry in a
Show. - Data
Path - Resolved path to a data (created during planning from AST DataReference)
- Date
Time Value - Engine
- Engine for evaluating Lemma rules.
- Error
Details - Detailed error information with optional source location.
- Errors
- Load failure: errors plus the source texts we attempted to load.
- Explanation
- Lemma
Base - The LemmaBase registry fetches Lemma source text from LemmaBase.
- Lemma
Repository - A Lemma repository header. Identity carrier; never owns specs.
- Lemma
Spec - A Lemma spec containing data and rules.
- Lemma
Spec Set - All spec versions sharing a (repository, name) identity, keyed by effective_from.
- Lemma
Type - Resolved type after planning
- Lexer
- Listed
Spec - Listed spec row from
Engine::list. - Literal
Value - Literal value with type. The single value type in semantics.
- Measure
Unit - A single unit within a Measure type.
- Measure
Units - Parse
Result - Ratio
Unit - Ratio
Units - Registry
Bundle - A bundle of Lemma source text returned by the Registry.
- Registry
Error - An error returned by a Registry implementation.
- Resolved
Repository - Repository group from
Engine::list. - Resource
Limits - Limits to prevent abuse and enable predictable resource usage
- Response
- Response from evaluating a Lemma spec
- Rule
Result - Result of evaluating a single rule. Struct fields match the API JSON shape.
- Serialized
Conversion Trace Step - Show
- Consumer [
Engine::show] result: data used by the spec’s rules, local rule result types, and resolved temporal window. Source: [Engine::source]. - Show
Version - Half-open
[effective_from, effective_to)for one loaded temporal row. - Source
- Positional source location: source id and span.
- Span
- Span representing a location in source code
- SpecRef
- A spec reference written in source.
- Timezone
Value
Enums§
- Binding
Data Value - Response row for spec data: type, plan metadata, and committed binding from overlay or spec literal.
- Conversion
Trace Role - Data
Value - Parse-time data value (before type resolution)
- Data
Value Input - Typed data value from a client (CLI/WASM). JSON parsing stays outside [
parse_data_value]. - Date
Granularity - Error
- Error types for the Lemma system with source location tracking
- Error
Kind - Classification of an
Error. Serialized as thekindfield on the flat object returned to JavaScript from WASM (engine/src/wasm.rs,JsError). - Explanation
Node - Operation
Result - Result of an operation (evaluating a rule or expression) TODO: Rename. This can also represent a data value.
- Registry
Error Kind - The kind of failure that occurred during a Registry operation.
- Request
Error Kind - Distinguishes HTTP 404 (not found) from 400 (bad request) for request errors.
- Source
Type - Token
Kind - Type
Specification - Value
Kind - Value payload (shape of a literal). No type attached. Measure unit is required; Ratio unit is optional (see plan ratio-units-optional.md).
- Veto
Type - Why an operation yielded no value (domain veto).
Constants§
- EMBEDDED_
STDLIB_ REPOSITORY - Repository name reserved for the embedded standard library (
repo lemma,spec units). UserEngine::loadmust not target this name viaSourceType::Dependency. - MAX_
DATA_ NAME_ LENGTH - MAX_
RULE_ NAME_ LENGTH - MAX_
SPEC_ NAME_ LENGTH - UNITS_
LEMMA
Traits§
- Registry
- Trait for resolving external repository references.
Functions§
- format_
explanation - format_
parse_ result - Format a
ParseResult(repository groups + specs) into canonical Lemma source. - format_
source - Parse a source string and format it to canonical Lemma source.
- format_
specs - Format a sequence of parsed specs into canonical Lemma source.
- parse
- parse_
spec_ set_ id - Validate and normalize a spec set identifier (a workspace spec name).
- resolve_
effective - Resolve an optional effective datetime string for planning or evaluation.
- resolve_
registry_ references - Resolve every
usesreference that carries a registry repository qualifier in the loaded specs. - try_
parse_ type_ constraint_ command - Parses a constraint command name. Returns None for unknown (parser returns error).
- type_
detail_ lines - Produce a human-readable summary of type constraints, or
Nonewhen there are no constraints worth showing (e.g. bareboolean). Returns one formatted string per constraint or property of the type specification. Usesdisplay_strfor all rational bounds so they render as decimals, not as raw fractions.