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

Function poly_nested_rec_binder_count

crates/kernel/src/inductive.rs:5536–5561  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5534 ty: cons_ty,
5535 },
5536 );
5537
5538 env.blocks.insert(
5539 block,
5540 vec![mk_id("PTree"), mk_id("PTree.leaf"), mk_id("PTree.node")],
5541 );
5542 env.blocks.insert(
5543 mk_id("List"),
5544 vec![mk_id("List"), mk_id("List.nil"), mk_id("List.cons")],
5545 );
5546 env
5547 }
5548
5549 #[test]
5550 fn poly_nested_flat_block() {
5551 let mut env = poly_nested_env();
5552 let mut tc = TypeChecker::new(&mut env);
5553 // Check inductive first (consumes fuel for validation)
5554 tc.check_const(&mk_id("PTree")).unwrap();
5555 // Reset fuel and generate recursors explicitly
5556 tc.rec_fuel = super::super::tc::max_rec_fuel();
5557 let block = mk_id("PTree");
5558 if !tc.env.recursor_cache.contains_key(&block) {
5559 tc.generate_block_recursors(&block).unwrap();
5560 }
5561
5562 let generated =
5563 tc.env.recursor_cache.get(&block).expect("recursor should be cached");
5564 assert_eq!(

Callers

nothing calls this directly

Calls 9

poly_nested_envFunction · 0.85
max_rec_fuelFunction · 0.85
check_constMethod · 0.80
mk_idFunction · 0.70
contains_keyMethod · 0.45
getMethod · 0.45
cloneMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected