Sce_core.ElabType-directed elaboration from resolved source-core terms to the explicit-environment core. Type comparisons are syntactic.
Unroll a mu body by substituting its complete recursive type. That type must be closed, since substitution does not shift free variables.
Positional lookup along the left spine of intersections, starting with the right component at index zero and excluding the terminal base.
val label_in : string -> Ast.typ -> boolTest label presence through intersections and signatures, without requiring uniqueness.
Find a uniquely occurring label through intersections and signatures. Return None for either absence or ambiguity.
Collect record fields in left-to-right order through intersections and signatures. Other type forms contribute no fields; duplicates are kept.
val elab_typ : Ast.typ -> Core_lambdae.Ast.typErase signatures and translate module arrows to ordinary core arrows.
val nmrg_core :
Core_lambdae.Ast.exp ->
Core_lambdae.Ast.exp ->
Core_lambdae.Ast.expBuild a non-dependent merge. Each operand is evaluated once, left to right, under the original ambient environment, including any host effects.
val linked_core :
Core_lambdae.Ast.typ ->
Core_lambdae.Ast.typ ->
Core_lambdae.Ast.typ ->
Core_lambdae.Ast.exp ->
Core_lambdae.Ast.exp ->
Core_lambdae.Ast.explinked_core provider_type imports result_type provider target builds a merge of the provider and the target's result. The target must have type imports -> result_type; imports must be a record or a left-nested intersection of records, all supplied unambiguously by the provider. These preconditions are not checked by this term constructor. Provider and target are evaluated once each, in that order, before application.
val elab : Ast.typ -> Ast.nameless -> Ast.typ * Core_lambdae.Ast.expelab ctx e returns the source-core type and elaborated term, with Query assigned ctx. Context extension appends an intersection component on the right. Types must be well-scoped, treating Fold's annotation as a mu body; scope is not checked separately.
val check : Ast.nameless -> Ast.typType-check a whole program under Ast.TTop, discarding its elaboration.
val compile : Ast.nameless -> Core_lambdae.Ast.expElaborate a whole program under Ast.TTop, discarding its source type.