aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.dune4
-rw-r--r--gramlib/grammar.ml5
-rw-r--r--gramlib/plexing.ml2
-rw-r--r--gramlib/plexing.mli3
-rw-r--r--tactics/tactics.ml5
-rw-r--r--test-suite/bugs/closed/bug_9494.v10
-rw-r--r--toplevel/coqloop.ml2
-rw-r--r--vernac/explainErr.ml1
8 files changed, 17 insertions, 15 deletions
diff --git a/Makefile.dune b/Makefile.dune
index 78ecc4b056..e3a8a30bc2 100644
--- a/Makefile.dune
+++ b/Makefile.dune
@@ -91,9 +91,9 @@ ocheck: voboot
dune build $(DUNEOPT) @install --workspace=dev/dune-workspace.all
trunk:
- dune build $(DUNEOPT) --profile=ocaml408 @vodeps
+ dune build $(DUNEOPT) --profile=ocaml409 @vodeps
dune exec coq_dune $(BUILD_CONTEXT)/.vfiles.d
- dune build $(DUNEOPT) --profile=ocaml408 coq.install coqide-server.install
+ dune build $(DUNEOPT) --profile=ocaml409 coq.install coqide-server.install
ireport:
dune clean
diff --git a/gramlib/grammar.ml b/gramlib/grammar.ml
index 0ad11d075f..e959e9b9e6 100644
--- a/gramlib/grammar.ml
+++ b/gramlib/grammar.ml
@@ -663,13 +663,8 @@ let init_entry_functions entry =
entry.econtinue <- f; f lev bp a strm)
let extend_entry ~warning entry position rules =
- try
let elev = Gramext.levels_of_rules ~warning entry position rules in
entry.edesc <- Dlevels elev; init_entry_functions entry
- with Plexing.Error s ->
- Printf.eprintf "Lexer initialization error:\n- %s\n" s;
- flush stderr;
- failwith "Grammar.extend"
(* Deleting a rule *)
diff --git a/gramlib/plexing.ml b/gramlib/plexing.ml
index f99a3c2480..fce5445ad8 100644
--- a/gramlib/plexing.ml
+++ b/gramlib/plexing.ml
@@ -4,8 +4,6 @@
type pattern = string * string
-exception Error of string
-
type location_function = int -> Loc.t
type 'te lexer_func = char Stream.t -> 'te Stream.t * location_function
diff --git a/gramlib/plexing.mli b/gramlib/plexing.mli
index eed4082e00..6139dc4020 100644
--- a/gramlib/plexing.mli
+++ b/gramlib/plexing.mli
@@ -19,9 +19,6 @@ type pattern = string * string
- The way tokens patterns are interpreted to parse tokens is done
by the lexer, function [tok_match] below. *)
-exception Error of string
- (** A lexing error exception to be used by lexers. *)
-
(** Lexer type *)
type 'te lexer =
diff --git a/tactics/tactics.ml b/tactics/tactics.ml
index 070b2356e5..f41706c35e 100644
--- a/tactics/tactics.ml
+++ b/tactics/tactics.ml
@@ -4522,8 +4522,11 @@ let induction_gen clear_flag isrec with_evars elim
declaring the induction argument as a new local variable *)
let id =
(* Type not the right one if partially applied but anyway for internal use*)
+ let avoid = match eqname with
+ | Some {CAst.v=IntroIdentifier id} -> Id.Set.singleton id
+ | _ -> Id.Set.empty in
let x = id_of_name_using_hdchar env evd t Anonymous in
- new_fresh_id Id.Set.empty x gl in
+ new_fresh_id avoid x gl in
let info_arg = (is_arg_pure_hyp, not enough_applied) in
pose_induction_arg_then
isrec with_evars info_arg elim id arg t inhyps cls
diff --git a/test-suite/bugs/closed/bug_9494.v b/test-suite/bugs/closed/bug_9494.v
new file mode 100644
index 0000000000..a0b8383d16
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9494.v
@@ -0,0 +1,10 @@
+Lemma foo (a : nat) : True.
+Proof.
+destruct a eqn:n; exact I.
+Qed.
+
+Set Mangle Names.
+Lemma foo2 (a : nat) : True.
+Proof.
+let N := fresh in destruct a eqn:N; exact I.
+Qed.
diff --git a/toplevel/coqloop.ml b/toplevel/coqloop.ml
index cdbe444e5b..e933f08735 100644
--- a/toplevel/coqloop.ml
+++ b/toplevel/coqloop.ml
@@ -256,7 +256,7 @@ let rec discard_to_dot () =
try
Pcoq.Entry.parse parse_to_dot top_buffer.tokens
with
- | Gramlib.Plexing.Error _ | CLexer.Error.E _ -> discard_to_dot ()
+ | CLexer.Error.E _ -> discard_to_dot ()
| e when CErrors.noncritical e -> ()
let read_sentence ~state input =
diff --git a/vernac/explainErr.ml b/vernac/explainErr.ml
index 71770a21ca..42b313f200 100644
--- a/vernac/explainErr.ml
+++ b/vernac/explainErr.ml
@@ -28,7 +28,6 @@ exception EvaluatedError of Pp.t * exn option
let explain_exn_default = function
(* Basic interaction exceptions *)
| Stream.Error txt -> hov 0 (str "Syntax error: " ++ str txt ++ str ".")
- | Gramlib.Plexing.Error txt -> hov 0 (str "Syntax error: " ++ str txt ++ str ".")
| CLexer.Error.E err -> hov 0 (str (CLexer.Error.to_string err))
| Sys_error msg -> hov 0 (str "System error: " ++ guill msg)
| Out_of_memory -> hov 0 (str "Out of memory.")