aboutsummaryrefslogtreecommitdiff
path: root/ide
diff options
context:
space:
mode:
Diffstat (limited to 'ide')
-rw-r--r--ide/coqide/coqide.ml4
-rw-r--r--ide/coqide/idetop.ml2
2 files changed, 4 insertions, 2 deletions
diff --git a/ide/coqide/coqide.ml b/ide/coqide/coqide.ml
index ab2a17798e..b66da11e7b 100644
--- a/ide/coqide/coqide.ml
+++ b/ide/coqide/coqide.ml
@@ -114,8 +114,10 @@ let make_coqtop_args fname =
(* We basically copy the code of Names.check_valid since it is not exported *)
(* to coqide. This is to prevent a possible failure of parsing "-topfile" *)
(* at initialization of coqtop (see #10286) *)
+ (* If the file name is a valid identifier, use it as toplevel name; *)
+ (* otherwise the default “Top” will be used. *)
match Unicode.ident_refutation (Filename.chop_extension (Filename.basename fname)) with
- | Some (_,x) -> output_string stderr (x^"\n"); exit 1
+ | Some _ -> args
| None -> "-topfile"::fname::args
in
proj, args
diff --git a/ide/coqide/idetop.ml b/ide/coqide/idetop.ml
index bd99cbed1b..2adc35ae3e 100644
--- a/ide/coqide/idetop.ml
+++ b/ide/coqide/idetop.ml
@@ -343,7 +343,7 @@ let search flags =
let pstate = Vernacstate.Declare.get_pstate () in
let sigma, env = match pstate with
| None -> let env = Global.env () in Evd.(from_env env, env)
- | Some p -> Declare.get_goal_context p 1 in
+ | Some p -> Declare.Proof.get_goal_context p 1 in
List.map export_coq_object (Search.interface_search env sigma (
List.map (fun (c, b) -> (import_search_constraint c, b)) flags)
)