MCPcopy Create free account
hub / github.com/ElementsProject/elements / isFrozen

Function isFrozen

src/simplicity/typeInference.c:402–405  ·  view source on GitHub ↗

Determine if the representative of an equivalence class of unification variables already has a reference * to a frozen version of its bound type. * * Note that free variables and variables bound to the 'ONE' type are automatically always frozen. * * Precondition: NULL == var->parent */

Source from the content-addressed store, hash-verified

400 * Precondition: NULL == var->parent
401 */
402static bool isFrozen(unification_var* var) {
403 simplicity_assert(!var->isBound || ONE != var->bound.kind || 0 == var->bound.frozen_ix);
404 return !var->isBound || ONE == var->bound.kind || var->bound.frozen_ix;
405}
406
407/* Given the representative of an equivalence class of unification variables that already has a reference to a frozen version
408 * of its bound type, return that reference.

Callers 1

freezeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected