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

Method cnst

crates/common/src/env.rs:860–868  ·  view source on GitHub ↗

Constructs a constant reference with universe level arguments.

(x: Name, us: Vec<Level>)

Source from the content-addressed store, hash-verified

858
859 /// Constructs a metavariable expression.
860 pub fn mvar(x: Name) -> Self {
861 let mut hasher = blake3::Hasher::new();
862 hasher.update(&[EMVAR]);
863 hasher.update(x.get_hash().as_bytes());
864 Expr(Arc::new(ExprData::Mvar(x, hasher.finalize())))
865 }
866
867 /// Constructs a sort expression from a universe level.
868 pub fn sort(x: Level) -> Self {
869 let mut hasher = blake3::Hasher::new();
870 hasher.update(&[ESORT]);
871 hasher.update(x.get_hash().as_bytes());

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