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

Function mut_const_kind

crates/compile/src/compile.rs:2796–2802  ·  view source on GitHub ↗

Returns a kind ordinal for cross-kind comparison of mutual constants.

(c: &MutConst)

Source from the content-addressed store, hash-verified

2794 match (x.as_data(), y.as_data()) {
2795 (LevelData::Mvar(..), _) | (_, LevelData::Mvar(..)) => {
2796 Err(CompileError::UnsupportedExpr {
2797 desc: "level metavariable in comparison".into(),
2798 })
2799 },
2800 (LevelData::Zero(_), LevelData::Zero(_)) => Ok(SOrd::eq(true)),
2801 (LevelData::Zero(_), _) => Ok(SOrd::lt(true)),
2802 (_, LevelData::Zero(_)) => Ok(SOrd::gt(true)),
2803 (LevelData::Succ(x, _), LevelData::Succ(y, _)) => {
2804 compare_level(x, y, x_ctx, y_ctx)
2805 },

Callers 1

compare_constFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected