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

Method is_nat_zero

crates/kernel/src/def_eq.rs:916–922  ·  view source on GitHub ↗

Check if expression is nat zero (literal 0 or Nat.zero constructor).

(&self, e: &KExpr<M>)

Source from the content-addressed store, hash-verified

914 } else {
915 match self.try_get_const(&ctors[0])? {
916 Some(KConst::Ctor { fields, .. }) => fields == 0,
917 _ => false,
918 }
919 }
920 },
921 _ => return Ok(false),
922 };
923 if !is_unit {
924 return Ok(false);
925 }

Callers 2

is_def_eq_natMethod · 0.80
try_def_eq_offsetMethod · 0.80

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected