Skip to content
Prismio docs
ImplementedPrismio 0.1.0

Compiler error reference

Permanent, searchable documentation pages for every distinct failure class covered by the Prismio 0.1 negative compiler suite.

Last verified

Implemented. Available in the audited Prismio 0.1.0 compiler. Pre-1.0 syntax may still change.

Prismio 0.1 emits prose diagnostics, not stable numeric codes. The identifiers below are permanent documentation URL keys. Match the central message fragment rather than expecting a code in compiler output.

Each page answers five questions: what the diagnostic means, why the compiler rejects the program, a minimal invalid example, a compiler-checked correction, and common repair strategies. The URL remains stable even when diagnostic wording improves.

Type and call errors

Documentation IDTypical message
type-mismatchexpected T, found U
integer-width-mismatchoperator expected one integer width
duplicate-overloadduplicate definition with same parameter types
wrong-arityexpects N arguments
optional-needs-unwrapmember access requires a struct value

Ownership and memory errors

Documentation IDTypical message
use-after-moveuse of moved value
move-from-borrowcannot move out of borrowed value
move-in-loopvalue is moved inside a loop
return-local-arraycannot return a local array
invalid-dropdrop requires an owned move-only value
container-ownershipcontainer transfer moves or borrows incorrectly
unique-aliassame value passed to two unique parameters
refuted-pinrequested tier cannot hold
region-budget-exceededregion exceeds its budget

Syntax, names, and control flow

Documentation IDTypical message
unknown-nameunknown identifier
visibility-violationis private to the file / internal to the package
immutable-assignmentbinding is not declared mut
missing-returnmust return a value on every path
unreachable-codeunreachable code
unexpected-top-level-tokenexpected a declaration
unclosed-blockblock is never closed
unnamed-regionexpected a name for the region
multiple-errorsaborting due to previous errors

Each page shows the failure, a correction, and related rules. Exact punctuation may change before stable diagnostic codes are introduced.

How to use this index

Start with the earliest primary diagnostic. Parse recovery can produce later cascades, so correct malformed syntax before diagnosing every unknown name or type. Then find a distinctive message fragment or browse by category.

Do not use mut as a universal ownership fix: it permits reassignment but does not revive a moved value. Do not add as blindly to silence a type error: ensure the conversion preserves the intended range. Do not remove sink, unique, or a region constraint without deciding whether the API/performance assertion was wrong.

After applying a fix, compile again. Some follow-up diagnostics disappear when the primary error is corrected; independent ones remain.

Version and stability

These pages describe compiler 0.1.0. Message prose, punctuation, notes, and colors are not stable. The required rejection and the underlying language rule are the durable contract. Future numeric compiler codes can be mapped to these permanent pages without changing their canonical URLs.