Ltac2_plugin.Tac2valSourceValues are represented in a way similar to OCaml, i.e. they contrast immediate integers (integers, constructors without arguments) and structured blocks (tuples, arrays, constructors with arguments), as well as a few other base cases, namely closures, strings, named constructors, and dynamic type coming from the Coq implementation.
type valexpr = | ValInt of intImmediate integers
*)| ValBlk of tag * valexpr arrayStructured blocks
*)| ValStr of Stdlib.Bytes.tStrings
*)| ValCls of closureClosures
*)| ValOpn of Names.KerName.t * valexpr arrayOpen constructors
*)| ValExt : 'a Tac2dyn.Val.tag * 'a -> valexprArbitrary data
*)Closures
The closure must not be already annotated
Given a closure, apply it to some arguments. Handling of argument mismatches is done automatically, i.e. in case of over or under-application.
Composition of to_closure and apply
Turn a fixed-arity function into a closure. The inner function is guaranteed to be applied to a list whose size is the integer argument.