MCPcopy Create free account
hub / github.com/argumentcomputer/ix / kconst_kind_ord

Function kconst_kind_ord

crates/kernel/src/canonical_check.rs:440–449  ·  view source on GitHub ↗

A stable kind ordinal for cross-kind `KConst` comparison. Matches the compile-side `mut_const_kind` (`src/ix/compile.rs:2590`) tagging: Defn=0, Indc=1, Recr=2; Axio/Quot/Ctor are not block-eligible but receive distinct slots for total comparator behavior.

(c: &KConst<M>)

Source from the content-addressed store, hash-verified

438 match c {
439 KConst::Defn { .. } => 0,
440 KConst::Indc { .. } => 1,
441 KConst::Recr { .. } => 2,
442 KConst::Ctor { .. } => 3,
443 KConst::Axio { .. } => 4,
444 KConst::Quot { .. } => 5,
445 }
446}
447
448/// Compare two block-eligible `KConst`s with full structural ordering.
449/// Different kinds order by `kconst_kind_ord`; same-kind dispatch goes to
450/// the kind-specific comparator.
451///
452/// `resolve_ctor` is invoked for each Indc-vs-Indc comparison to fetch

Callers 2

compare_kctorFunction · 0.85
compare_kconstFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected