Navigation

_internal

fx.tc.eval._internal: cross-part evaluator helpers reachable from sibling parts via the self-fixpoint; not part of the stable consumer surface.

mkCanonAppVF

mkCanonAppVF: value-level constructor for canon-app id params body-as-tagged-VDescCon — currying-applies body to params and stamps the result with _canonRef = { id; params; body; } so conv/quote short-circuit on the canonical identity instead of forcing .D.

mkCanonAppVF : Int -> String -> [Val] -> Val -> Val

Generic counterpart of mkDescDescAppVF for user-registered canonical descriptions. bodyVal is expected to be a curried chain of VLams that, after applying every element of paramVals, yields a VDescCon. The raw result's .D/.i/.d fields are reused; the _canonRef stamp takes precedence in conv and quote so the recursive .D slot is never forced.

bodyVal is preserved on the stamp so quote can emit T.mkCanonApp id params body. canonRefConv compares stamps by (id, params) only; body is conv-irrelevant.

Throws if the curried application does not produce a VDescCon — the smart-form's static contract.

mkDescDescAppVF

mkDescDescAppVF: value-level constructor for descDesc I L-as-tagged-VDescCon — builds the tagged shell before forcing the recursively computed fields so conv/quote can recognise the canonical reference without descending into the strong-levitation spiral.

mkDescDescAppVF : Int -> Val -> Val -> Val

Returns a VDescCon whose _canonRef = { id = "descDesc"; I; L; } marker lets conv/quote treat the value opaquely. Eliminators (descView, vInterpDF, ...) walk through descViewF's one-step semantic view of the same reference rather than forcing .D directly.

The underlying raw value is descDescVal I L evaluated via vAppF; its fields are reused but the canonical marker takes precedence in conv and quote. This separation enables sharing a single descDesc value across every recursive position in the kernel without re-evaluating the spiral.