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

Function mk_defn

crates/kernel/src/testing.rs:132–154  ·  view source on GitHub ↗
(
  name: &str,
  lvls: u64,
  level_params: Vec<Name>,
  ty: ME,
  val: ME,
  hints: ReducibilityHints,
)

Source from the content-addressed store, hash-verified

130// ---- Constant builders ----
131
132pub fn mk_defn(
133 name: &str,
134 lvls: u64,
135 level_params: Vec<Name>,
136 ty: ME,
137 val: ME,
138 hints: ReducibilityHints,
139) -> (MId, KConst<Meta>) {
140 let id = mk_id(name);
141 let c = KConst::Defn {
142 name: mk_name(name),
143 level_params,
144 kind: DefKind::Definition,
145 safety: DefinitionSafety::Safe,
146 hints,
147 lvls,
148 ty,
149 val,
150 lean_all: vec![id.clone()],
151 block: id.clone(),
152 };
153 (id, c)
154}
155
156pub fn mk_thm(
157 name: &str,

Callers 15

compile_const_innerFunction · 0.85
compile_mutualFunction · 0.85
peano_envFunction · 0.85
good_n_rec_reductionFunction · 0.85
good_rtree_rec_reductionFunction · 0.85
good_nat_litFunction · 0.85
good_basic_defFunction · 0.85
bad_def_type_mismatchFunction · 0.85
good_arrow_typeFunction · 0.85
good_dependent_typeFunction · 0.85

Calls 3

mk_idFunction · 0.70
mk_nameFunction · 0.70
cloneMethod · 0.45

Tested by

no test coverage detected