package coq-core
Install
Dune Dependency
Authors
Maintainers
Sources
md5=66e57ea55275903bef74d5bf36fbe0f1
sha512=1a7eac6e2f58724a3f9d68bbb321e4cfe963ba1a5551b9b011db4b3f559c79be433d810ff262593d753770ee41ea68fbd6a60daa1e2319ea00dff64c8851d70b
doc/ltac2_plugin/Ltac2_plugin/Tac2val/index.html
Module Ltac2_plugin.Tac2val
Source
Toplevel values
Dynamic semantics
Values 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 int
(*Immediate integers
*)| ValBlk of tag * valexpr array
(*Structured blocks
*)| ValStr of Stdlib.Bytes.t
(*Strings
*)| ValCls of closure
(*Closures
*)| ValOpn of Names.KerName.t * valexpr array
(*Open constructors
*)| ValExt : 'a Tac2dyn.Val.tag * 'a -> valexpr
(*Arbitrary 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.