blob: 9d58ae0339d206a4b301b304e8f15623e4da6af7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
(************************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
(** * Interface of calls to Coq by CoqIde *)
type 'a menu = 'a * (string * string) list
type goals =
| Message of string
| Goals of ((string menu) list * string menu) list
type 'a call
val raw_interp : string -> unit call
val interp : bool -> string -> int call
val rewind : int -> int call
val is_in_loadpath : string -> bool call
val make_cases : string -> string list list call
(** The status, for instance "Ready in SomeSection, proving Foo" *)
val current_status : string call
val current_goals : goals call
(** What has been displayed by coqtop recently ? *)
val read_stdout : string call
(** * Coq answers to CoqIde *)
type location = (int * int) option (* start and end of the error *)
type 'a value =
| Good of 'a
| Fail of (location * string)
type handler = {
is_in_loadpath : string -> bool;
raw_interp : string -> unit;
interp : bool -> string -> int;
rewind : int -> int;
read_stdout : unit -> string;
current_goals : unit -> goals;
current_status : unit -> string;
make_cases : string -> string list list;
}
val abstract_eval_call :
handler -> (exn -> location * string) ->
'a call -> 'a value
|