aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/derive/derive.ml38
-rw-r--r--plugins/extraction/big.ml24
-rw-r--r--plugins/extraction/common.ml2
-rw-r--r--plugins/funind/functional_principles_types.ml2
-rw-r--r--plugins/ltac/extratactics.mlg7
-rw-r--r--plugins/ltac/g_obligations.mlg2
-rw-r--r--plugins/ltac/pptactic.ml6
-rw-r--r--plugins/ltac/rewrite.ml15
-rw-r--r--plugins/ltac/tacentries.ml43
-rw-r--r--plugins/ltac/tacexpr.ml4
-rw-r--r--plugins/ltac/tacexpr.mli4
-rw-r--r--plugins/ltac/tacintern.ml5
-rw-r--r--plugins/ltac/tacinterp.ml20
-rw-r--r--plugins/ltac/tactic_matching.ml8
-rw-r--r--plugins/micromega/itv.ml5
-rw-r--r--plugins/micromega/polynomial.mli2
-rw-r--r--plugins/micromega/simplex.ml1
-rw-r--r--plugins/nsatz/ideal.ml4
-rw-r--r--plugins/nsatz/nsatz.ml2
-rw-r--r--plugins/rtauto/refl_tauto.ml2
-rw-r--r--plugins/setoid_ring/newring.ml4
-rw-r--r--plugins/ssr/ssrast.mli1
-rw-r--r--plugins/ssr/ssrcommon.ml2
-rw-r--r--plugins/ssr/ssripats.ml8
-rw-r--r--plugins/ssr/ssrvernac.mlg2
-rw-r--r--plugins/ssrmatching/ssrmatching.ml4
-rw-r--r--plugins/ssrmatching/ssrmatching.mli1
27 files changed, 125 insertions, 93 deletions
diff --git a/plugins/derive/derive.ml b/plugins/derive/derive.ml
index 480819ebe1..6f9384941b 100644
--- a/plugins/derive/derive.ml
+++ b/plugins/derive/derive.ml
@@ -27,12 +27,12 @@ let start_deriving f suchthat lemma =
let sigma = Evd.from_env env in
let kind = Decl_kinds.(Global,false,DefinitionBody Definition) in
- (** create a sort variable for the type of [f] *)
+ (* create a sort variable for the type of [f] *)
(* spiwack: I don't know what the rigidity flag does, picked the one
that looked the most general. *)
let (sigma,f_type_sort) = Evd.new_sort_variable Evd.univ_flexible_alg sigma in
let f_type_type = EConstr.mkSort f_type_sort in
- (** create the initial goals for the proof: |- Type ; |- ?1 ; f:=?2 |- suchthat *)
+ (* create the initial goals for the proof: |- Type ; |- ?1 ; f:=?2 |- suchthat *)
let goals =
let open Proofview in
TCons ( env , sigma , f_type_type , (fun sigma f_type ->
@@ -45,14 +45,14 @@ let start_deriving f suchthat lemma =
TNil sigma))))))
in
- (** The terminator handles the registering of constants when the proof is closed. *)
+ (* The terminator handles the registering of constants when the proof is closed. *)
let terminator com =
let open Proof_global in
- (** Extracts the relevant information from the proof. [Admitted]
- and [Save] result in user errors. [opaque] is [true] if the
- proof was concluded by [Qed], and [false] if [Defined]. [f_def]
- and [lemma_def] correspond to the proof of [f] and of
- [suchthat], respectively. *)
+ (* Extracts the relevant information from the proof. [Admitted]
+ and [Save] result in user errors. [opaque] is [true] if the
+ proof was concluded by [Qed], and [false] if [Defined]. [f_def]
+ and [lemma_def] correspond to the proof of [f] and of
+ [suchthat], respectively. *)
let (opaque,f_def,lemma_def) =
match com with
| Admitted _ -> CErrors.user_err Pp.(str "Admitted isn't supported in Derive.")
@@ -64,26 +64,26 @@ let start_deriving f suchthat lemma =
opaque <> Proof_global.Transparent , f_def , lemma_def
| _ -> assert false
in
- (** The opacity of [f_def] is adjusted to be [false], as it
- must. Then [f] is declared in the global environment. *)
+ (* The opacity of [f_def] is adjusted to be [false], as it
+ must. Then [f] is declared in the global environment. *)
let f_def = { f_def with Entries.const_entry_opaque = false } in
let f_def = Entries.DefinitionEntry f_def , Decl_kinds.(IsDefinition Definition) in
let f_kn = Declare.declare_constant f f_def in
let f_kn_term = mkConst f_kn in
- (** In the type and body of the proof of [suchthat] there can be
- references to the variable [f]. It needs to be replaced by
- references to the constant [f] declared above. This substitution
- performs this precise action. *)
+ (* In the type and body of the proof of [suchthat] there can be
+ references to the variable [f]. It needs to be replaced by
+ references to the constant [f] declared above. This substitution
+ performs this precise action. *)
let substf c = Vars.replace_vars [f,f_kn_term] c in
- (** Extracts the type of the proof of [suchthat]. *)
+ (* Extracts the type of the proof of [suchthat]. *)
let lemma_pretype =
match Entries.(lemma_def.const_entry_type) with
| Some t -> t
| None -> assert false (* Proof_global always sets type here. *)
in
- (** The references of [f] are subsituted appropriately. *)
+ (* The references of [f] are subsituted appropriately. *)
let lemma_type = substf lemma_pretype in
- (** The same is done in the body of the proof. *)
+ (* The same is done in the body of the proof. *)
let lemma_body =
map_const_entry_body substf Entries.(lemma_def.const_entry_body)
in
@@ -105,7 +105,3 @@ let start_deriving f suchthat lemma =
Proof.run_tactic env Proofview.(tclFOCUS 1 2 shelve) p
end in
()
-
-
-
-
diff --git a/plugins/extraction/big.ml b/plugins/extraction/big.ml
index 9c0f373c6a..c675eacc92 100644
--- a/plugins/extraction/big.ml
+++ b/plugins/extraction/big.ml
@@ -20,8 +20,10 @@ type big_int = Big_int.big_int
let zero = zero_big_int
(** The big integer [0]. *)
+
let one = unit_big_int
(** The big integer [1]. *)
+
let two = big_int_of_int 2
(** The big integer [2]. *)
@@ -29,28 +31,39 @@ let two = big_int_of_int 2
let opp = minus_big_int
(** Unary negation. *)
+
let abs = abs_big_int
(** Absolute value. *)
+
let add = add_big_int
(** Addition. *)
+
let succ = succ_big_int
(** Successor (add 1). *)
+
let add_int = add_int_big_int
(** Addition of a small integer to a big integer. *)
+
let sub = sub_big_int
(** Subtraction. *)
+
let pred = pred_big_int
(** Predecessor (subtract 1). *)
+
let mult = mult_big_int
(** Multiplication of two big integers. *)
+
let mult_int = mult_int_big_int
(** Multiplication of a big integer by a small integer *)
+
let square = square_big_int
(** Return the square of the given big integer *)
+
let sqrt = sqrt_big_int
(** [sqrt_big_int a] returns the integer square root of [a],
that is, the largest big integer [r] such that [r * r <= a].
Raise [Invalid_argument] if [a] is negative. *)
+
let quomod = quomod_big_int
(** Euclidean division of two big integers.
The first part of the result is the quotient,
@@ -58,14 +71,18 @@ let quomod = quomod_big_int
Writing [(q,r) = quomod_big_int a b], we have
[a = q * b + r] and [0 <= r < |b|].
Raise [Division_by_zero] if the divisor is zero. *)
+
let div = div_big_int
(** Euclidean quotient of two big integers.
This is the first result [q] of [quomod_big_int] (see above). *)
+
let modulo = mod_big_int
(** Euclidean modulus of two big integers.
This is the second result [r] of [quomod_big_int] (see above). *)
+
let gcd = gcd_big_int
(** Greatest common divisor of two big integers. *)
+
let power = power_big_int_positive_big_int
(** Exponentiation functions. Return the big integer
representing the first argument [a] raised to the power [b]
@@ -78,18 +95,22 @@ let power = power_big_int_positive_big_int
let sign = sign_big_int
(** Return [0] if the given big integer is zero,
[1] if it is positive, and [-1] if it is negative. *)
+
let compare = compare_big_int
(** [compare_big_int a b] returns [0] if [a] and [b] are equal,
[1] if [a] is greater than [b], and [-1] if [a] is smaller
than [b]. *)
+
let eq = eq_big_int
let le = le_big_int
let ge = ge_big_int
let lt = lt_big_int
let gt = gt_big_int
(** Usual boolean comparisons between two big integers. *)
+
let max = max_big_int
(** Return the greater of its two arguments. *)
+
let min = min_big_int
(** Return the smaller of its two arguments. *)
@@ -98,6 +119,7 @@ let min = min_big_int
let to_string = string_of_big_int
(** Return the string representation of the given big integer,
in decimal (base 10). *)
+
let of_string = big_int_of_string
(** Convert a string to a big integer, in decimal.
The string consists of an optional [-] or [+] sign,
@@ -107,6 +129,7 @@ let of_string = big_int_of_string
let of_int = big_int_of_int
(** Convert a small integer to a big integer. *)
+
let is_int = is_int_big_int
(** Test whether the given big integer is small enough to
be representable as a small integer (type [int])
@@ -115,6 +138,7 @@ let is_int = is_int_big_int
[a] is between 2{^30} and 2{^30}-1. On a 64-bit platform,
[is_int_big_int a] returns [true] if and only if
[a] is between -2{^62} and 2{^62}-1. *)
+
let to_int = int_of_big_int
(** Convert a big integer to a small integer (type [int]).
Raises [Failure "int_of_big_int"] if the big integer
diff --git a/plugins/extraction/common.ml b/plugins/extraction/common.ml
index bdeb6fca60..59c57cc544 100644
--- a/plugins/extraction/common.ml
+++ b/plugins/extraction/common.ml
@@ -125,7 +125,7 @@ module KOrd =
struct
type t = kind * string
let compare (k1, s1) (k2, s2) =
- let c = Pervasives.compare k1 k2 (** OK *) in
+ let c = Pervasives.compare k1 k2 (* OK *) in
if c = 0 then String.compare s1 s2
else c
end
diff --git a/plugins/funind/functional_principles_types.ml b/plugins/funind/functional_principles_types.ml
index 4cdfc6fac5..12b68e208c 100644
--- a/plugins/funind/functional_principles_types.ml
+++ b/plugins/funind/functional_principles_types.ml
@@ -41,7 +41,7 @@ let pop t = Vars.lift (-1) t
*)
let compute_new_princ_type_from_rel rel_to_fun sorts princ_type =
let princ_type = EConstr.of_constr princ_type in
- let princ_type_info = compute_elim_sig Evd.empty princ_type (** FIXME *) in
+ let princ_type_info = compute_elim_sig Evd.empty princ_type (* FIXME *) in
let env = Global.env () in
let env_with_params = EConstr.push_rel_context princ_type_info.params env in
let tbl = Hashtbl.create 792 in
diff --git a/plugins/ltac/extratactics.mlg b/plugins/ltac/extratactics.mlg
index 603dd60cf2..ec2adf065a 100644
--- a/plugins/ltac/extratactics.mlg
+++ b/plugins/ltac/extratactics.mlg
@@ -306,8 +306,8 @@ let add_rewrite_hint ~poly bases ort t lcsr =
let ctx =
let ctx = UState.context_set ctx in
if poly then ctx
- else (** This is a global universe context that shouldn't be
- refreshed at every use of the hint, declare it globally. *)
+ else (* This is a global universe context that shouldn't be
+ refreshed at every use of the hint, declare it globally. *)
(Declare.declare_universe_context false ctx;
Univ.ContextSet.empty)
in
@@ -738,7 +738,8 @@ let mkCaseEq a : unit Proofview.tactic =
Proofview.Goal.enter begin fun gl ->
let concl = Proofview.Goal.concl gl in
let env = Proofview.Goal.env gl in
- (** FIXME: this looks really wrong. Does anybody really use this tactic? *)
+ (* FIXME: this looks really wrong. Does anybody really use
+ this tactic? *)
let (_, c) = Tacred.pattern_occs [Locus.OnlyOccurrences [1], a] env (Evd.from_env env) concl in
change_concl c
end;
diff --git a/plugins/ltac/g_obligations.mlg b/plugins/ltac/g_obligations.mlg
index ef18dd6cdc..1ea6ff84d4 100644
--- a/plugins/ltac/g_obligations.mlg
+++ b/plugins/ltac/g_obligations.mlg
@@ -24,7 +24,7 @@ let (set_default_tactic, get_default_tactic, print_default_tactic) =
Tactic_option.declare_tactic_option "Program tactic"
let () =
- (** Delay to recover the tactic imperatively *)
+ (* Delay to recover the tactic imperatively *)
let tac = Proofview.tclBIND (Proofview.tclUNIT ()) begin fun () ->
snd (get_default_tactic ())
end in
diff --git a/plugins/ltac/pptactic.ml b/plugins/ltac/pptactic.ml
index 55e58187b0..2267d43d93 100644
--- a/plugins/ltac/pptactic.ml
+++ b/plugins/ltac/pptactic.ml
@@ -235,8 +235,8 @@ let string_of_genarg_arg (ArgumentType arg) =
let pr_tacarg_using_rule pr_gen l =
let l = match l with
| TacTerm s :: l ->
- (** First terminal token should be considered as the name of the tactic,
- so we tag it differently than the other terminal tokens. *)
+ (* First terminal token should be considered as the name of the tactic,
+ so we tag it differently than the other terminal tokens. *)
primitive s :: tacarg_using_rule_token pr_gen l
| _ -> tacarg_using_rule_token pr_gen l
in
@@ -1180,7 +1180,7 @@ let pr_goal_selector ~toplevel s =
pr_constant = pr_evaluable_reference_env env;
pr_reference = pr_located pr_ltac_constant;
pr_name = pr_id;
- (** Those are not used by the atomic printer *)
+ (* Those are not used by the atomic printer *)
pr_generic = (fun _ -> assert false);
pr_extend = (fun _ _ _ -> assert false);
pr_alias = (fun _ _ _ -> assert false);
diff --git a/plugins/ltac/rewrite.ml b/plugins/ltac/rewrite.ml
index 06783de614..e626df5579 100644
--- a/plugins/ltac/rewrite.ml
+++ b/plugins/ltac/rewrite.ml
@@ -97,7 +97,7 @@ let goalevars evars = fst evars
let cstrevars evars = snd evars
let new_cstr_evar (evd,cstrs) env t =
- (** We handle the typeclass resolution of constraints ourselves *)
+ (* We handle the typeclass resolution of constraints ourselves *)
let (evd', t) = Evarutil.new_evar env evd ~typeclass_candidate:false t in
let ev, _ = destEvar evd' t in
(evd', Evar.Set.add ev cstrs), t
@@ -474,7 +474,7 @@ let get_symmetric_proof b =
let error_no_relation () = user_err Pp.(str "Cannot find a relation to rewrite.")
let rec decompose_app_rel env evd t =
- (** Head normalize for compatibility with the old meta mechanism *)
+ (* Head normalize for compatibility with the old meta mechanism *)
let t = Reductionops.whd_betaiota evd t in
match EConstr.kind evd t with
| App (f, [||]) -> assert false
@@ -613,7 +613,7 @@ let solve_remaining_by env sigma holes by =
Some evk
| _ -> None
in
- (** Only solve independent holes *)
+ (* Only solve independent holes *)
let indep = List.map_filter map holes in
let ist = { Geninterp.lfun = Id.Map.empty; extra = Geninterp.TacStore.empty } in
let solve_tac = match tac with
@@ -628,7 +628,7 @@ let solve_remaining_by env sigma holes by =
in
match evi with
| None -> sigma
- (** Evar should not be defined, but just in case *)
+ (* Evar should not be defined, but just in case *)
| Some evi ->
let env = Environ.reset_with_named_context evi.evar_hyps env in
let ty = evi.evar_concl in
@@ -646,6 +646,7 @@ let poly_inverse sort =
type rewrite_proof =
| RewPrf of constr * constr
(** A Relation (R : rew_car -> rew_car -> Prop) and a proof of R rew_from rew_to *)
+
| RewCast of cast_kind
(** A proof of convertibility (with casts) *)
@@ -1561,7 +1562,7 @@ let newfail n s =
let cl_rewrite_clause_newtac ?abs ?origsigma ~progress strat clause =
let open Proofview.Notations in
- (** For compatibility *)
+ (* For compatibility *)
let beta = Tactics.reduct_in_concl (Reductionops.nf_betaiota, DEFAULTcast) in
let beta_hyp id = Tactics.reduct_in_hyp Reductionops.nf_betaiota (id, InHyp) in
let treat sigma res =
@@ -1611,7 +1612,7 @@ let cl_rewrite_clause_newtac ?abs ?origsigma ~progress strat clause =
let env = match clause with
| None -> env
| Some id ->
- (** Only consider variables not depending on [id] *)
+ (* Only consider variables not depending on [id] *)
let ctx = named_context env in
let filter decl = not (occur_var_in_decl env sigma id decl) in
let nctx = List.filter filter ctx in
@@ -1623,7 +1624,7 @@ let cl_rewrite_clause_newtac ?abs ?origsigma ~progress strat clause =
in
let sigma = match origsigma with None -> sigma | Some sigma -> sigma in
treat sigma res <*>
- (** For compatibility *)
+ (* For compatibility *)
beta <*> Proofview.shelve_unifiable
with
| PretypeError (env, evd, (UnsatisfiableConstraints _ as e)) ->
diff --git a/plugins/ltac/tacentries.ml b/plugins/ltac/tacentries.ml
index 2aee809eb6..b770b97384 100644
--- a/plugins/ltac/tacentries.ml
+++ b/plugins/ltac/tacentries.ml
@@ -169,7 +169,7 @@ let add_tactic_entry (kn, ml, tg) state =
let entry, pos = get_tactic_entry tg.tacgram_level in
let mkact loc l =
let map arg =
- (** HACK to handle especially the tactic(...) entry *)
+ (* HACK to handle especially the tactic(...) entry *)
let wit = Genarg.rawwit Tacarg.wit_tactic in
if Genarg.has_type arg wit && not ml then
Tacexp (Genarg.out_gen wit arg)
@@ -223,7 +223,7 @@ let interp_prod_item = function
| Some arg -> arg
end
| Some n ->
- (** FIXME: do better someday *)
+ (* FIXME: do better someday *)
assert (String.equal s "tactic");
begin match Tacarg.wit_tactic with
| ExtraArg tag -> ArgT.Any tag
@@ -241,9 +241,9 @@ let make_fresh_key =
| TacNonTerm _ -> "#"
in
let prods = String.concat "_" (List.map map prods) in
- (** We embed the hash of the kernel name in the label so that the identifier
- should be mostly unique. This ensures that including two modules
- together won't confuse the corresponding labels. *)
+ (* We embed the hash of the kernel name in the label so that the identifier
+ should be mostly unique. This ensures that including two modules
+ together won't confuse the corresponding labels. *)
let hash = (cur lxor (ModPath.hash (Lib.current_mp ()))) land 0x7FFFFFFF in
let lbl = Id.of_string_soft (Printf.sprintf "%s_%08X" prods hash) in
Lib.make_kn lbl
@@ -281,7 +281,7 @@ let open_tactic_notation i (_, tobj) =
let load_tactic_notation i (_, tobj) =
let key = tobj.tacobj_key in
let () = check_key key in
- (** Only add the printing and interpretation rules. *)
+ (* Only add the printing and interpretation rules. *)
Tacenv.register_alias key tobj.tacobj_body;
Pptactic.declare_notation_tactic_pprule key (pprule tobj.tacobj_tacgram);
if Int.equal i 1 && not tobj.tacobj_local then
@@ -342,7 +342,7 @@ let extend_atomic_tactic name entries =
let map_prod prods =
let (hd, rem) = match prods with
| TacTerm s :: rem -> (s, rem)
- | _ -> assert false (** Not handled by the ML extension syntax *)
+ | _ -> assert false (* Not handled by the ML extension syntax *)
in
let empty_value = function
| TacTerm s -> raise NonEmptyArgument
@@ -383,8 +383,8 @@ let add_ml_tactic_notation name ~level ?deprecation prods =
add_glob_tactic_notation false ~level ?deprecation prods true ids tac
in
List.iteri iter (List.rev prods);
- (** We call [extend_atomic_tactic] only for "basic tactics" (the ones at
- tactic_expr level 0) *)
+ (* We call [extend_atomic_tactic] only for "basic tactics" (the ones
+ at tactic_expr level 0) *)
if Int.equal level 0 then extend_atomic_tactic name prods
(**********************************************************************)
@@ -474,8 +474,9 @@ let register_ltac local ?deprecation tacl =
(name, body)
in
let defs () =
- (** Register locally the tactic to handle recursivity. This function affects
- the whole environment, so that we transactify it afterwards. *)
+ (* Register locally the tactic to handle recursivity. This
+ function affects the whole environment, so that we transactify
+ it afterwards. *)
let iter_rec (sp, kn) = Tacenv.push_tactic (Nametab.Until 1) sp kn in
let () = List.iter iter_rec recvars in
List.map map rfun
@@ -557,7 +558,7 @@ let () =
register_grammars_by_name "tactic" entries
let get_identifier i =
- (** Workaround for badly-designed generic arguments lacking a closure *)
+ (* Workaround for badly-designed generic arguments lacking a closure *)
Names.Id.of_string_soft (Printf.sprintf "$%i" i)
type _ ty_sig =
@@ -650,20 +651,22 @@ let tactic_extend plugin_name tacname ~level ?deprecation sign =
in
match sign with
| [TyML (TyIdent (name, s),tac) as ml_tac] when only_constr s ->
- (** The extension is only made of a name followed by constr entries: we do not
- add any grammar nor printing rule and add it as a true Ltac definition. *)
+ (* The extension is only made of a name followed by constr
+ entries: we do not add any grammar nor printing rule and add it
+ as a true Ltac definition. *)
let vars = mk_sign_vars 1 s in
let ml = { Tacexpr.mltac_name = ml_tactic_name; Tacexpr.mltac_index = 0 } in
let tac = match s with
| TyNil -> eval ml_tac
- (** Special handling of tactics without arguments: such tactics do not do
- a Proofview.Goal.nf_enter to compute their arguments. It matters for some
- whole-prof tactics like [shelve_unifiable]. *)
+ (* Special handling of tactics without arguments: such tactics do
+ not do a Proofview.Goal.nf_enter to compute their arguments. It
+ matters for some whole-prof tactics like [shelve_unifiable]. *)
| _ -> lift_constr_tac_to_ml_tac vars (eval ml_tac)
in
- (** Arguments are not passed directly to the ML tactic in the TacML node,
- the ML tactic retrieves its arguments in the [ist] environment instead.
- This is the rôle of the [lift_constr_tac_to_ml_tac] function. *)
+ (* Arguments are not passed directly to the ML tactic in the TacML
+ node, the ML tactic retrieves its arguments in the [ist]
+ environment instead. This is the rôle of the
+ [lift_constr_tac_to_ml_tac] function. *)
let body = Tacexpr.TacFun (vars, Tacexpr.TacML (CAst.make (ml, [])))in
let id = Names.Id.of_string name in
let obj () = Tacenv.register_ltac true false id body ?deprecation in
diff --git a/plugins/ltac/tacexpr.ml b/plugins/ltac/tacexpr.ml
index 2bd21f9d7a..83f563e2ab 100644
--- a/plugins/ltac/tacexpr.ml
+++ b/plugins/ltac/tacexpr.ml
@@ -78,12 +78,12 @@ type ('a,'t) match_rule =
(** Extension indentifiers for the TACTIC EXTEND mechanism. *)
type ml_tactic_name = {
+ mltac_plugin : string;
(** Name of the plugin where the tactic is defined, typically coming from a
DECLARE PLUGIN statement in the source. *)
- mltac_plugin : string;
+ mltac_tactic : string;
(** Name of the tactic entry where the tactic is defined, typically found
after the TACTIC EXTEND statement in the source. *)
- mltac_tactic : string;
}
type ml_tactic_entry = {
diff --git a/plugins/ltac/tacexpr.mli b/plugins/ltac/tacexpr.mli
index 0c27f3bfe2..da0ecfc449 100644
--- a/plugins/ltac/tacexpr.mli
+++ b/plugins/ltac/tacexpr.mli
@@ -78,12 +78,12 @@ type ('a,'t) match_rule =
(** Extension indentifiers for the TACTIC EXTEND mechanism. *)
type ml_tactic_name = {
+ mltac_plugin : string;
(** Name of the plugin where the tactic is defined, typically coming from a
DECLARE PLUGIN statement in the source. *)
- mltac_plugin : string;
+ mltac_tactic : string;
(** Name of the tactic entry where the tactic is defined, typically found
after the TACTIC EXTEND statement in the source. *)
- mltac_tactic : string;
}
type ml_tactic_entry = {
diff --git a/plugins/ltac/tacintern.ml b/plugins/ltac/tacintern.ml
index 85c6348b52..a1e21aab04 100644
--- a/plugins/ltac/tacintern.ml
+++ b/plugins/ltac/tacintern.ml
@@ -843,8 +843,9 @@ let notation_subst bindings tac =
(make ?loc @@ Name id, c) :: accu
in
let bindings = Id.Map.fold fold bindings [] in
- (** This is theoretically not correct due to potential variable capture, but
- Ltac has no true variables so one cannot simply substitute *)
+ (* This is theoretically not correct due to potential variable
+ capture, but Ltac has no true variables so one cannot simply
+ substitute *)
TacLetIn (false, bindings, tac)
let () = Genintern.register_ntn_subst0 wit_tactic notation_subst
diff --git a/plugins/ltac/tacinterp.ml b/plugins/ltac/tacinterp.ml
index cf5eb442be..284642b38c 100644
--- a/plugins/ltac/tacinterp.ml
+++ b/plugins/ltac/tacinterp.ml
@@ -50,7 +50,7 @@ let has_type : type a. Val.t -> a typed_abstract_argument_type -> bool = fun v w
let Val.Dyn (t, _) = v in
let t' = match val_tag wit with
| Val.Base t' -> t'
- | _ -> assert false (** not used in this module *)
+ | _ -> assert false (* not used in this module *)
in
match Val.eq t t' with
| None -> false
@@ -68,13 +68,13 @@ let in_list tag v =
let in_gen wit v =
let t = match val_tag wit with
| Val.Base t -> t
- | _ -> assert false (** not used in this module *)
+ | _ -> assert false (* not used in this module *)
in
Val.Dyn (t, v)
let out_gen wit v =
let t = match val_tag wit with
| Val.Base t -> t
- | _ -> assert false (** not used in this module *)
+ | _ -> assert false (* not used in this module *)
in
match prj t v with None -> assert false | Some x -> x
@@ -585,8 +585,8 @@ let interp_pure_open_constr ist =
let interp_typed_pattern ist env sigma (_,c,_) =
let sigma, c =
interp_gen WithoutTypeConstraint ist true pure_open_constr_flags env sigma c in
- (** FIXME: it is necessary to be unsafe here because of the way we handle
- evars in the pretyper. Sometimes they get solved eagerly. *)
+ (* FIXME: it is necessary to be unsafe here because of the way we handle
+ evars in the pretyper. Sometimes they get solved eagerly. *)
pattern_of_constr env sigma (EConstr.Unsafe.to_constr c)
(* Interprets a constr expression *)
@@ -897,7 +897,7 @@ let interp_destruction_arg ist gl arg =
end)
in
try
- (** FIXME: should be moved to taccoerce *)
+ (* FIXME: should be moved to taccoerce *)
let v = Id.Map.find id ist.lfun in
if has_type v (topwit wit_intro_pattern) then
let v = out_gen (topwit wit_intro_pattern) v in
@@ -1020,7 +1020,7 @@ let rec val_interp ist ?(appl=UnnamedAppl) (tac:glob_tactic_expr) : Val.t Ftacti
| TacMatch (lz,c,lmr) -> interp_match ist lz c lmr
| TacArg {loc;v} -> interp_tacarg ist v
| t ->
- (** Delayed evaluation *)
+ (* Delayed evaluation *)
Ftactic.return (of_tacvalue (VFun (UnnamedAppl,extract_trace ist, ist.lfun, [], t)))
in
let open Ftactic in
@@ -1396,12 +1396,12 @@ and interp_match_successes lz ist s =
general
| Select ->
begin
- (** Only keep the first matching result, we don't backtrack on it *)
+ (* Only keep the first matching result, we don't backtrack on it *)
let s = Proofview.tclONCE s in
s >>= fun ans -> interp_match_success ist ans
end
| Once ->
- (** Once a tactic has succeeded, do not backtrack anymore *)
+ (* Once a tactic has succeeded, do not backtrack anymore *)
Proofview.tclONCE general
(* Interprets the Match expressions *)
@@ -1438,7 +1438,7 @@ and interp_match_goal ist lz lr lmr =
(* Interprets extended tactic generic arguments *)
and interp_genarg ist x : Val.t Ftactic.t =
let open Ftactic.Notations in
- (** Ad-hoc handling of some types. *)
+ (* Ad-hoc handling of some types. *)
let tag = genarg_tag x in
if argument_type_eq tag (unquote (topwit (wit_list wit_var))) then
interp_genarg_var_list ist x
diff --git a/plugins/ltac/tactic_matching.ml b/plugins/ltac/tactic_matching.ml
index c949589e22..54924f1644 100644
--- a/plugins/ltac/tactic_matching.ml
+++ b/plugins/ltac/tactic_matching.ml
@@ -59,7 +59,7 @@ let id_map_try_add_name id x m =
the binding of the right-hand argument shadows that of the left-hand
argument. *)
let id_map_right_biased_union m1 m2 =
- if Id.Map.is_empty m1 then m2 (** Don't reconstruct the whole map *)
+ if Id.Map.is_empty m1 then m2 (* Don't reconstruct the whole map *)
else Id.Map.fold Id.Map.add m2 m1
(** Tests whether the substitution [s] is empty. *)
@@ -102,7 +102,7 @@ let verify_metas_coherence env sigma (ln1,lcm) (ln,lm) =
else raise Not_coherent_metas
in
let (+++) lfun1 lfun2 = Id.Map.fold Id.Map.add lfun1 lfun2 in
- (** ppedrot: Is that even correct? *)
+ (* ppedrot: Is that even correct? *)
let merged = ln +++ ln1 in
(merged, Id.Map.merge merge lcm lm)
@@ -263,8 +263,8 @@ module PatternMatching (E:StaticEnvironment) = struct
| All lhs -> wildcard_match_term lhs
| Pat ([],pat,lhs) -> pattern_match_term false pat term lhs
| Pat _ ->
- (** Rules with hypotheses, only work in match goal. *)
- fail
+ (* Rules with hypotheses, only work in match goal. *)
+ fail
(** [match_term term rules] matches the term [term] with the set of
matching rules [rules].*)
diff --git a/plugins/micromega/itv.ml b/plugins/micromega/itv.ml
index dc1df7ec9f..44cad820ed 100644
--- a/plugins/micromega/itv.ml
+++ b/plugins/micromega/itv.ml
@@ -11,10 +11,11 @@
(** Intervals (extracted from mfourier.ml) *)
open Num
+
(** The type of intervals is *)
type interval = num option * num option
- (** None models the absence of bound i.e. infinity *)
- (** As a result,
+ (** None models the absence of bound i.e. infinity
+ As a result,
- None , None -> \]-oo,+oo\[
- None , Some v -> \]-oo,v\]
- Some v, None -> \[v,+oo\[
diff --git a/plugins/micromega/polynomial.mli b/plugins/micromega/polynomial.mli
index f5e9a9f34c..23f3470d77 100644
--- a/plugins/micromega/polynomial.mli
+++ b/plugins/micromega/polynomial.mli
@@ -103,7 +103,7 @@ module Poly : sig
end
-type cstr = {coeffs : Vect.t ; op : op ; cst : Num.num} (** Representation of linear constraints *)
+type cstr = {coeffs : Vect.t ; op : op ; cst : Num.num} (* Representation of linear constraints *)
and op = Eq | Ge | Gt
val eval_op : op -> Num.num -> Num.num -> bool
diff --git a/plugins/micromega/simplex.ml b/plugins/micromega/simplex.ml
index 8d8c6ea90b..4465aa1ee1 100644
--- a/plugins/micromega/simplex.ml
+++ b/plugins/micromega/simplex.ml
@@ -20,6 +20,7 @@ type iset = unit IMap.t
type tableau = Vect.t IMap.t (** Mapping basic variables to their equation.
All variables >= than a threshold rst are restricted.*)
+
module Restricted =
struct
type t =
diff --git a/plugins/nsatz/ideal.ml b/plugins/nsatz/ideal.ml
index f8fc943713..1825a4d77c 100644
--- a/plugins/nsatz/ideal.ml
+++ b/plugins/nsatz/ideal.ml
@@ -609,7 +609,7 @@ type current_problem = {
exception NotInIdealUpdate of current_problem
let test_dans_ideal cur_pb table metadata p lp len0 =
- (** Invariant: [lp] is [List.tl (Array.to_list table.allpol)] *)
+ (* Invariant: [lp] is [List.tl (Array.to_list table.allpol)] *)
let (c,r) = reduce2 table cur_pb.cur_poly lp in
info (fun () -> "remainder: "^(stringPcut metadata r));
let cur_pb = {
@@ -657,7 +657,7 @@ let deg_hom p =
| (a,m)::_ -> Monomial.deg m
let pbuchf table metadata cur_pb homogeneous (lp, lpc) p =
- (** Invariant: [lp] is [List.tl (Array.to_list table.allpol)] *)
+ (* Invariant: [lp] is [List.tl (Array.to_list table.allpol)] *)
sinfo "computation of the Groebner basis";
let () = match table.hmon with
| None -> ()
diff --git a/plugins/nsatz/nsatz.ml b/plugins/nsatz/nsatz.ml
index ef60a23e80..1777418ef6 100644
--- a/plugins/nsatz/nsatz.ml
+++ b/plugins/nsatz/nsatz.ml
@@ -374,7 +374,7 @@ let remove_zeros lci =
let m = List.length lci in
let u = Array.make m false in
let rec utiles k =
- (** TODO: Find a more reasonable implementation of this traversal. *)
+ (* TODO: Find a more reasonable implementation of this traversal. *)
if k >= m || u.(k) then ()
else
let () = u.(k) <- true in
diff --git a/plugins/rtauto/refl_tauto.ml b/plugins/rtauto/refl_tauto.ml
index e66fa10d5b..f1fa694356 100644
--- a/plugins/rtauto/refl_tauto.ml
+++ b/plugins/rtauto/refl_tauto.ml
@@ -131,7 +131,7 @@ let rec make_hyps atom_env gls lenv = function
| LocalAssum (id,typ)::rest ->
let hrec=
make_hyps atom_env gls (typ::lenv) rest in
- if List.exists (fun c -> Termops.local_occur_var Evd.empty (** FIXME *) id c) lenv ||
+ if List.exists (fun c -> Termops.local_occur_var Evd.empty (* FIXME *) id c) lenv ||
(Retyping.get_sort_family_of
(pf_env gls) (Tacmach.project gls) typ != InProp)
then
diff --git a/plugins/setoid_ring/newring.ml b/plugins/setoid_ring/newring.ml
index 4109e9cf38..9fea3ddcda 100644
--- a/plugins/setoid_ring/newring.ml
+++ b/plugins/setoid_ring/newring.ml
@@ -194,12 +194,12 @@ let exec_tactic env evd n f args =
in
let (_, args, lfun) = List.fold_right fold args (0, [], Id.Map.empty) in
let ist = { (Tacinterp.default_ist ()) with Tacinterp.lfun = lfun; } in
- (** Build the getter *)
+ (* Build the getter *)
let lid = List.init n (fun i -> Id.of_string("x"^string_of_int i)) in
let n = Genarg.in_gen (Genarg.glbwit Stdarg.wit_int) n in
let get_res = TacML (CAst.make (get_res, [TacGeneric n])) in
let getter = Tacexp (TacFun (List.map (fun n -> Name n) lid, get_res)) in
- (** Evaluate the whole result *)
+ (* Evaluate the whole result *)
let gl = dummy_goal env evd in
let gls = Proofview.V82.of_tactic (Tacinterp.eval_tactic_ist ist (ltac_call f (args@[getter]))) gl in
let evd = Evd.minimize_universes (Refiner.project gls) in
diff --git a/plugins/ssr/ssrast.mli b/plugins/ssr/ssrast.mli
index bb8a0faf2e..11e282e4f5 100644
--- a/plugins/ssr/ssrast.mli
+++ b/plugins/ssr/ssrast.mli
@@ -104,6 +104,7 @@ type ssrintrosarg = Tacexpr.raw_tactic_expr * ssripats
type ssrfwdid = Id.t
+
(** Binders (for fwd tactics) *)
type 'term ssrbind =
| Bvar of Name.t
diff --git a/plugins/ssr/ssrcommon.ml b/plugins/ssr/ssrcommon.ml
index efc4a2c743..cd9af84ed9 100644
--- a/plugins/ssr/ssrcommon.ml
+++ b/plugins/ssr/ssrcommon.ml
@@ -263,7 +263,7 @@ let of_ftactic ftac gl =
let tac = Proofview.V82.of_tactic tac in
let { sigma = sigma } = tac gl in
let ans = match !r with
- | None -> assert false (** If the tactic failed we should not reach this point *)
+ | None -> assert false (* If the tactic failed we should not reach this point *)
| Some ans -> ans
in
(sigma, ans)
diff --git a/plugins/ssr/ssripats.ml b/plugins/ssr/ssripats.ml
index 0553260472..18b4aeab1e 100644
--- a/plugins/ssr/ssripats.ml
+++ b/plugins/ssr/ssripats.ml
@@ -86,9 +86,9 @@ end (* }}} *************************************************************** *)
open State
-(** [=> *] ****************************************************************)
-(** [nb_assums] returns the number of dependent premises *)
-(** Warning: unlike [nb_deps_assums], it does not perform reduction *)
+(***[=> *] ****************************************************************)
+(** [nb_assums] returns the number of dependent premises
+ Warning: unlike [nb_deps_assums], it does not perform reduction *)
let rec nb_assums cur env sigma t =
match EConstr.kind sigma t with
| Prod(name,ty,body) ->
@@ -148,7 +148,7 @@ let tac_case t =
Ssrelim.ssrscasetac t
end
-(** [=> [: id]] ************************************************************)
+(***[=> [: id]] ************************************************************)
[@@@ocaml.warning "-3"]
let mk_abstract_id =
let open Coqlib in
diff --git a/plugins/ssr/ssrvernac.mlg b/plugins/ssr/ssrvernac.mlg
index 4ed75cdbe4..191a4e9a20 100644
--- a/plugins/ssr/ssrvernac.mlg
+++ b/plugins/ssr/ssrvernac.mlg
@@ -359,7 +359,7 @@ let coerce_search_pattern_to_sort hpat =
Pattern.PApp (fp, args') in
let hr, na = splay_search_pattern 0 hpat in
let dc, ht =
- let hr, _ = Typeops.type_of_global_in_context env hr (** FIXME *) in
+ let hr, _ = Typeops.type_of_global_in_context env hr (* FIXME *) in
Reductionops.splay_prod env sigma (EConstr.of_constr hr) in
let np = List.length dc in
if np < na then CErrors.user_err (Pp.str "too many arguments in head search pattern") else
diff --git a/plugins/ssrmatching/ssrmatching.ml b/plugins/ssrmatching/ssrmatching.ml
index 6497b6ff98..efd65ade15 100644
--- a/plugins/ssrmatching/ssrmatching.ml
+++ b/plugins/ssrmatching/ssrmatching.ml
@@ -122,6 +122,7 @@ let add_genarg tag pr =
(** Constructors for cast type *)
let dC t = CastConv t
+
(** Constructors for constr_expr *)
let isCVar = function { CAst.v = CRef (qid,_) } -> qualid_is_ident qid | _ -> false
let destCVar = function
@@ -139,6 +140,7 @@ let mkCLambda ?loc name ty t = CAst.make ?loc @@
let mkCLetIn ?loc name bo t = CAst.make ?loc @@
CLetIn ((CAst.make ?loc name), bo, None, t)
let mkCCast ?loc t ty = CAst.make ?loc @@ CCast (t, dC ty)
+
(** Constructors for rawconstr *)
let mkRHole = DAst.make @@ GHole (InternalHole, IntroAnonymous, None)
let mkRApp f args = if args = [] then f else DAst.make @@ GApp (f, args)
@@ -925,7 +927,7 @@ let of_ftactic ftac gl =
let tac = Proofview.V82.of_tactic tac in
let { sigma = sigma } = tac gl in
let ans = match !r with
- | None -> assert false (** If the tactic failed we should not reach this point *)
+ | None -> assert false (* If the tactic failed we should not reach this point *)
| Some ans -> ans
in
(sigma, ans)
diff --git a/plugins/ssrmatching/ssrmatching.mli b/plugins/ssrmatching/ssrmatching.mli
index 8672c55767..f0bb6f58a6 100644
--- a/plugins/ssrmatching/ssrmatching.mli
+++ b/plugins/ssrmatching/ssrmatching.mli
@@ -194,6 +194,7 @@ val cpattern_of_term : char * glob_constr_and_expr -> Geninterp.interp_sign -> c
(** [do_once r f] calls [f] and updates the ref only once *)
val do_once : 'a option ref -> (unit -> 'a) -> unit
+
(** [assert_done r] return the content of r. @raise Anomaly is r is [None] *)
val assert_done : 'a option ref -> 'a