blob: 09bae13283ed6fe41ead98c59420d117974bb0e4 (
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
|
(***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
(* *)
(* Copyright 1996 Institut National de Recherche en Informatique et *)
(* Automatique. Distributed only by permission. *)
(* *)
(***********************************************************************)
(* $Id$ *)
(* The interactive toplevel loop *)
val loop: unit -> unit
(* Interface with toplevel directives *)
type directive_fun =
Directive_none of (unit -> unit)
| Directive_string of (string -> unit)
| Directive_int of (int -> unit)
| Directive_ident of (Longident.t -> unit)
val directive_table: (string, directive_fun) Hashtbl.t
(* Table of known directives, with their execution function *)
val execute_phrase: Parsetree.toplevel_phrase -> bool
(* Execute the given toplevel phrase. Return [true] if the
phrase executed with no errors and [false] otherwise. *)
val print_exception_outcome: exn -> unit
(* Print an exception resulting from the evaluation of user code. *)
val toplevel_env: Env.t ref
(* Typing environment for the toplevel *)
val parse_toplevel_phrase : (Lexing.lexbuf -> Parsetree.toplevel_phrase) ref
|