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

Method letE

crates/common/src/env.rs:903–912  ·  view source on GitHub ↗
(n: Name, t: Expr, v: Expr, b: Expr, nd: bool)

Source from the content-addressed store, hash-verified

901 hasher.update(b.get_hash().as_bytes());
902 hasher.update(&[binder_info_tag(&bi)]);
903 Expr(Arc::new(ExprData::Lam(n, t, b, bi, hasher.finalize())))
904 }
905
906 /// Constructs a dependent function type (forall / Pi).
907 pub fn all(n: Name, t: Expr, b: Expr, bi: BinderInfo) -> Self {
908 let mut hasher = blake3::Hasher::new();
909 hasher.update(&[EALL]);
910 hasher.update(n.get_hash().as_bytes());
911 hasher.update(t.get_hash().as_bytes());
912 hasher.update(b.get_hash().as_bytes());
913 hasher.update(&[binder_info_tag(&bi)]);
914 Expr(Arc::new(ExprData::ForallE(n, t, b, bi, hasher.finalize())))
915 }

Callers

nothing calls this directly

Calls 4

as_bytesMethod · 0.80
get_hashMethod · 0.80
finalizeMethod · 0.80
ExprClass · 0.70

Tested by

no test coverage detected