aboutsummaryrefslogtreecommitdiff
path: root/ide
diff options
context:
space:
mode:
authorVincent Laporte2020-06-22 10:16:56 +0200
committerVincent Laporte2020-06-22 11:13:24 +0200
commit518d92d33bcd94cb1b448ab60de146b1814b76fb (patch)
tree48d1a651d28a9c2307f89ad7b0ab61155e3cacf5 /ide
parent95dc2953c8b4e685c5e9f01b5baca8964ff158d6 (diff)
CoqIDE: accept to open files with invalid names
Diffstat (limited to 'ide')
-rw-r--r--ide/coqide/coqide.ml4
1 files changed, 3 insertions, 1 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