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

Method nat_succ_n

crates/kernel/src/whnf.rs:1966–1973  ·  view source on GitHub ↗
(&mut self, mut e: KExpr<M>, n: u64)

Source from the content-addressed store, hash-verified

1964 // Get the first constructor
1965 let ctor_id = match self.try_get_const(&ind_id)? {
1966 Some(KConst::Indc { ctors, .. }) if !ctors.is_empty() => ctors[0].clone(),
1967 _ => return Ok(None),
1968 };
1969
1970 // Build nullary ctor application: Ctor.{levels} params...
1971 let ctor_us = match ty_head.data() {
1972 ExprData::Const(_, us, _) => us.clone(),
1973 _ => return Ok(None),
1974 };
1975 let mut ctor_app = self.intern(KExpr::cnst(ctor_id, ctor_us));
1976 for arg in ty_args.iter().take(recr.params) {

Callers 1

try_reduce_bitvec_ultMethod · 0.80

Calls 4

internMethod · 0.80
cnstFunction · 0.70
appFunction · 0.70
cloneMethod · 0.45

Tested by

no test coverage detected