Debian Codegraph @

plugins/ltac2/tac2core.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 open Names
12
13 val throw : ?info:Exninfo.info -> exn -> 'a Proofview.tactic
14
15 (** [catch_exceptions] default false *)
16 val pf_apply : ?catch_exceptions:bool -> (Environ.env -> Evd.evar_map -> 'a Proofview.tactic) -> 'a Proofview.tactic
17
18 (** Adds ltac2 backtrace. With [passthrough:false] (default), acts
19 like [Proofview.wrap_exceptions] + Ltac2 backtrace handling. *)
20 val wrap_exceptions : ?passthrough:bool -> (unit -> 'a Proofview.tactic) -> 'a Proofview.tactic
21
22 val constr_flags : Pretyping.inference_flags
23 val open_constr_no_classes_flags : Pretyping.inference_flags
24 val preterm_flags : Pretyping.inference_flags
25
26 module type MapType = sig
27 (** to have less boilerplate we use S.elt rather than declaring a toplevel type t *)
28 module S : CSig.USetS
29 module M : CMap.UExtS with type key = S.elt and module Set := S
30 type valmap
31 val valmap_eq : (valmap, Tac2val.valexpr M.t) Util.eq
32 val repr : S.elt Tac2ffi.repr
33 end
34
35 type ('a,'set,'map) map_tag
36
37 val map_tag_eq : ('a,'set1,'map1) map_tag -> ('b,'set2,'map2) map_tag ->
38 ('a * 'set1 * 'map1, 'b * 'set2 * 'map2) Util.eq option
39
40 type any_map_tag = Any : _ map_tag -> any_map_tag
41 type tagged_set = TaggedSet : (_,'set,_) map_tag * 'set -> tagged_set
42 type tagged_map = TaggedMap : (_,_,'map) map_tag * 'map -> tagged_map
43
44 val map_tag_repr : any_map_tag Tac2ffi.repr
45 val set_repr : tagged_set Tac2ffi.repr
46 val map_repr : tagged_map Tac2ffi.repr
47
48 val tag_set : (_,'set,_) map_tag -> 'set -> Tac2val.valexpr
49 val tag_map : (_,_,'map) map_tag -> 'map -> Tac2val.valexpr
50
51 val register_map : ?plugin:string -> tag_name:string
52 -> (module MapType with type S.elt = 'a and type S.t = 'set and type valmap = 'map)
53 -> ('a,'set,'map) map_tag
54 (** Register a type on which we can use finite sets and maps.
55 [tag_name] is the name used for the external to make the
56 [Ltac2.FSet.Tags.tag] available. *)
57
58 val get_map : ('a,'set,'map) map_tag ->
59 (module MapType with type S.elt = 'a and type S.t = 'set and type valmap = 'map)
60
61 (** Default registered maps *)
62
63 val ident_map_tag : (Id.t, Id.Set.t, Tac2val.valexpr Id.Map.t) map_tag
64 val int_map_tag : (int, Int.Set.t, Tac2val.valexpr Int.Map.t) map_tag
65 val string_map_tag : (string, CString.Set.t, Tac2val.valexpr CString.Map.t) map_tag
66 val inductive_map_tag : (inductive, Indset_env.t, Tac2val.valexpr Indmap_env.t) map_tag
67 val constructor_map_tag : (constructor, Constrset_env.t, Tac2val.valexpr Constrmap_env.t) map_tag
68 val constant_map_tag : (Constant.t, Cset_env.t, Tac2val.valexpr Cmap_env.t) map_tag