Argon diagnostics use a structured naming scheme: OE / OW / OI plus four digits. Run ox explain <code> for the long-form explanation of any diagnostic.
The naming scheme:
OE (Oxide Error) — the build fails. Codes in the four-digit range; the leading two digits categorise the source area (compiler / runtime / package / kernel / network / …).
OW (Oxide Warning) — the build proceeds; the issue is flagged.
OI (Oxide Info) — informational hint; nothing is wrong.
ox explain <code> prints the canonical long-form explanation and a fix suggestion. The reference below lists every code shipped today, organised by category.
Diagnostics for the collection substrate covered in Chapter 2.8.
Code
Meaning
OE2401
Type-constructor arity mismatch — Set[T, U], Map[T], Optional[T, U]. Set / List / Optional / Range take 1 type argument; Map takes 2.
OE2402
Collection-op expression form parsed cleanly but full UFCS desugaring and runtime evaluation are not yet wired (tracked by the E3 epic). Workaround: write the qualified-call form (std::collection::List::size(xs)) or rebuild via direct field assignments.
OE2403
Collection element-type mismatch — List[Nat].append("foo"), [1, "two", true]. Argon collections are homogeneous; the expected element type comes from the receiver’s declared type.
OE2404
Index expression’s type isn’t Nat (for List) or doesn’t match the declared key type (for Map::get).
OE2405
Slice bounds invalid — xs[5..2], negative literal bound. Checked at elaboration for literal bounds; dynamic bounds are checked at runtime.
OE2406
Unordered collection indexed — s[i] where s: Set[T]. Set elements have no positional identity; use Set::contains for membership tests or convert to a List.
OE2407
Higher-order argument’s signature does not match the operation’s expected closure shape (xs.map(f) where f has the wrong arity or wrong argument types).
OE2408
Higher-tier collection op used inside a context that admits only tier:closure or below — typically xs.map(f) inside a derive rule body. Lift the transformation into a pub compute or rewrite using closure-tier ops.
OW2401
Optional unwrapped without a clear fallback — bare .unwrap() or .unwrap_or whose fallback is itself Optional[T]. Provide a concrete T-typed fallback or guard with is_some.
OW2402
[T; <= 1] is a singleton-bounded set; Optional[T] (sugared T?) expresses the same intent more directly and integrates with the Optional op surface. Quickfix suggestion, not a hard error.
OW2403
Comprehension binder shadows a let binding or parameter in the enclosing scope. Rename the binder to silence. Matches the fresh-binder convention Datalog rule bodies already use.
Unsatisfiable concept (TBox-level: contradictory axioms make the concept impossible to instantiate)
OW0302
Redundant axiom
OW0303
Decidability warning
OE0304
Incoherent TBox
OW0305
Unsatisfiable concept (warning-severity twin of OE0301; what ox check --reason actually emits when reasoning over imported / under-specified ontologies, so contradictions in the source don’t gate the check)
OE0306
Disjointness violation — ABox contradiction at evaluation time (an individual is asserted as instance of two disjoint concepts; distinct from OE0301 which is a TBox contradiction)
OW0307
Hypothetical block evaluation error — override target shape, missing individual, missing property, or unsupported value type
OntoUML cardinality letter-shorthand (n/m) preserved as marker for byte-stable round-trip (Argon’s grammar fully expresses the semantics; the marker only pins the source’s lexical form)
The full explanation includes the rule violated, a typical example that triggers it, and the canonical fix. ox explain is the authoritative surface — this appendix is a navigation aid, not a replacement.