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

Function strip_mdata

crates/compile/src/congruence.rs:337–343  ·  view source on GitHub ↗

Strip Mdata wrappers from an expression.

(e: &Expr)

Source from the content-addressed store, hash-verified

335
336/// Strip Mdata wrappers from an expression.
337pub fn strip_mdata(e: &Expr) -> &Expr {
338 let mut cur = e;
339 while let ExprData::Mdata(_, inner, _) = cur.as_data() {
340 cur = inner;
341 }
342 cur
343}
344
345pub fn check_nat_eq(a: &Nat, b: &Nat, field: &str) -> Result<(), String> {
346 let av = a.to_u64().unwrap_or(u64::MAX);

Callers 3

expr_alpha_eqFunction · 0.85
expr_alpha_eq_ctxFunction · 0.85
aux_spec_eqFunction · 0.85

Calls 1

as_dataMethod · 0.80

Tested by

no test coverage detected