aboutsummaryrefslogtreecommitdiff
path: root/ide
diff options
context:
space:
mode:
Diffstat (limited to 'ide')
-rw-r--r--ide/coq.mli2
-rw-r--r--ide/coqide.ml7
-rw-r--r--ide/wg_ScriptView.ml7
3 files changed, 10 insertions, 6 deletions
diff --git a/ide/coq.mli b/ide/coq.mli
index c19fe7889a..43a040822f 100644
--- a/ide/coq.mli
+++ b/ide/coq.mli
@@ -99,7 +99,7 @@ val evars : handle -> Interface.evar list option Interface.value
val hints : handle -> (Interface.hint list * Interface.hint) option Interface.value
val inloadpath : handle -> string -> bool Interface.value
val mkcases : handle -> string -> string list list Interface.value
-val search : handle -> Interface.search_flags -> Interface.search_answer list Interface.value
+val search : handle -> Interface.search_flags -> string Interface.coq_object list Interface.value
(** A specialized version of [raw_interp] dedicated to
set/unset options. *)
diff --git a/ide/coqide.ml b/ide/coqide.ml
index 27eb5fceab..c75a7885eb 100644
--- a/ide/coqide.ml
+++ b/ide/coqide.ml
@@ -1744,10 +1744,9 @@ let main files =
let results = match results with | Interface.Good l -> l | _ -> [] in
let buf = term.message_view#buffer in
let insert result =
- let basename = result.Interface.search_answer_base_name in
- let path = result.Interface.search_answer_full_path in
- let name = String.concat "." path ^ "." ^ basename in
- let tpe = result.Interface.search_answer_type in
+ let qualid = result.Interface.coq_object_qualid in
+ let name = String.concat "." qualid in
+ let tpe = result.Interface.coq_object_object in
buf#insert ~tags:[Tags.Message.item] name;
buf#insert "\n";
buf#insert tpe;
diff --git a/ide/wg_ScriptView.ml b/ide/wg_ScriptView.ml
index 2c524ab74f..82dd77344b 100644
--- a/ide/wg_ScriptView.ml
+++ b/ide/wg_ScriptView.ml
@@ -61,7 +61,12 @@ let get_completion (buffer : GText.buffer) coqtop w =
let query handle = match Coq.search handle flags with
| Interface.Good l ->
let fold accu elt =
- Proposals.add elt.Interface.search_answer_base_name accu
+ let rec last accu = function
+ | [] -> accu
+ | [basename] -> Proposals.add basename accu
+ | _ :: l -> last accu l
+ in
+ last accu elt.Interface.coq_object_qualid
in
ans := (List.fold_left fold accu l)
| _ -> ()