Repository navigation
Added
-
Compile-time diagnostics for configuration and imports.
prima checknow reportsE0022
for unknownconfig/with configkeys (with adid you meansuggestion backed by the same
key table the runtime uses),E0030for imports that resolve to no module (embedded stdlib →
hosted namespace → filesystem, matching the module loader), andE0032forfrom-imports or
qualified access to items that exist but are notpub. Dependencies are not recursively
checked; the runtime keepsR0008as the fallback for dynamic load failures. -
W0004 unreachable_code. Statements after areturnin the same block are reported as a
warning (spec §16.5). -
Diagnostics code-table guard. A test pins the appendix C code set and covers the four codes
added in this release, so the document and the implementation cannot drift silently. -
mem::Arcexplicit reference counting (spec §12.3/§12.4).import mem;now provides
mem::Arc::new(x),a.clone(),a.get(), anda.strong_count(). The count starts at 1 and is
raised only by an explicitclone; ordinary class-instance copies (let b = a) share the handle
without changing it, and the count never decreases because the host layer has no destructor hooks.
The four methods carry///docs and appear inprima doc --stdlib. -
Pollard rho for
math::factor. After stripping factors up to 10,000 by trial division,
factoruses Miller–Rabin plus Brent's Pollard rho, so large semiprimes no longer require
sqrt(n)divisions. Results stay ascending with multiplicity, and the bounded search falls back
to trial division rather than returning a wrong answer.
Fixed
-
?now returns early from the enclosingResult/Optionfunction. Previously?onNone
raisedR0011and?onErrraised a runtime error, sofn f() -> Option<T> { let x = xs.get(0)?; Some(x) }failed instead of returningNone. TheErr/Nonevalue is now carried
by an internal propagation marker and caught at function-call boundaries, matching spec §16.3. -
prima checknow agrees with the evaluator on valid symbolic code. Unbound single-segment
identifiers in value position are free symbolic variables (as the evaluator already treated
them), soprima check examples/is clean except the intentionally broken example; only
call-position names are undefined. Struct patterns with binding-only fields are irrefutable in
let(no spuriousE0053), and class or method names no longer produceW0003.