(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* <O___,, * (see version control and CREDITS file for authors & dates) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************)
open Names open EConstr open Tac2dyn open Tac2val
(** {5 Ltac2 FFI} *)
type'a repr
val repr_of : 'a repr -> 'a -> valexpr val repr_to : 'a repr -> valexpr -> 'a
val make_repr : ('a -> valexpr) -> (valexpr -> 'a) -> 'a repr
val map_repr : ('a -> 'b) -> ('b -> 'a) -> 'a repr -> 'b repr
(** These functions allow to convert back and forth between OCaml and Ltac2 data representation. The [to_*] functions raise an anomaly whenever the data
has not expected shape. *)
val of_unit : unit -> valexpr val to_unit : valexpr -> unit val unit : unit repr
val of_int : int -> valexpr val to_int : valexpr -> int val int : int repr
val of_bool : bool -> valexpr val to_bool : valexpr -> bool valbool : bool repr
val of_char : char -> valexpr val to_char : valexpr -> char val char : char repr
val of_bytes : Bytes.t -> valexpr val to_bytes : valexpr -> Bytes.t val bytes : Bytes.t repr
(** WARNING these functions copy *) val of_string : string -> valexpr val to_string : valexpr -> string valstring : string repr
val of_list : ('a -> valexpr) -> 'a list -> valexpr val to_list : (valexpr -> 'a) -> valexpr -> 'a list vallist : 'a repr -> 'a list repr
val of_constr : EConstr.t -> valexpr val to_constr : valexpr -> EConstr.t val constr : EConstr.t repr
val of_matching_context : Constr_matching.context -> valexpr val to_matching_context : valexpr -> Constr_matching.context val matching_context : Constr_matching.context repr
val of_preterm : Ltac_pretype.closed_glob_constr -> valexpr val to_preterm : valexpr -> Ltac_pretype.closed_glob_constr val preterm : Ltac_pretype.closed_glob_constr repr
val of_cast : Constr.cast_kind -> valexpr val to_cast : valexpr -> Constr.cast_kind val cast : Constr.cast_kind repr
(** Toplevel representation of OCaml exceptions. Invariant: no [LtacError]
should be used with [err]. *) val of_err : Exninfo.iexn -> valexpr val to_err : valexpr -> Exninfo.iexn val err : Exninfo.iexn repr
val of_exn : Exninfo.iexn -> valexpr val to_exn : valexpr -> Exninfo.iexn val exn : Exninfo.iexn repr
val of_exninfo : Exninfo.info -> valexpr val to_exninfo : valexpr -> Exninfo.info val exninfo : Exninfo.info repr
val of_result : ('a -> valexpr) -> ('a, Exninfo.iexn) result -> valexpr val to_result : (valexpr -> 'a) -> valexpr -> ('a, Exninfo.iexn) result val result : 'a repr -> ('a, Exninfo.iexn) result repr
val of_ident : Id.t -> valexpr val to_ident : valexpr -> Id.t val ident : Id.t repr
val of_closure : closure -> valexpr val to_closure : valexpr -> closure val closure : closure repr
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.