diff options
| author | Pierre Weis <Pierre.Weis@inria.fr> | 2000-03-06 22:12:09 +0000 |
|---|---|---|
| committer | Pierre Weis <Pierre.Weis@inria.fr> | 2000-03-06 22:12:09 +0000 |
| commit | b96208b7a247cbb6d9d162fbfaf54448af33589c (patch) | |
| tree | a63fb52f6e36ca47129637586cf6d0fd3d576733 /toplevel/toploop.mli | |
| parent | a56ae9a35f7cb4b5ccd128c2b9610b4913d71331 (diff) | |
| download | ocaml-b96208b7a247cbb6d9d162fbfaf54448af33589c.tar.gz | |
Revu les impressions du compilateur
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2908 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'toplevel/toploop.mli')
| -rw-r--r-- | toplevel/toploop.mli | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/toplevel/toploop.mli b/toplevel/toploop.mli index 945065b19d..e8fe874d98 100644 --- a/toplevel/toploop.mli +++ b/toplevel/toploop.mli @@ -12,37 +12,39 @@ (* $Id$ *) +open Format + (* The interactive toplevel loop *) -val loop: unit -> unit +val loop : formatter -> unit (* Read and execute a script from the given file *) -val run_script: string -> string array -> bool +val run_script : formatter -> string -> string array -> bool (* true if successful, false if error *) (* 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) - | Directive_bool of (bool -> unit) + | Directive_none of (unit -> unit) + | Directive_string of (string -> unit) + | Directive_int of (int -> unit) + | Directive_ident of (Longident.t -> unit) + | Directive_bool of (bool -> unit) -val directive_table: (string, directive_fun) Hashtbl.t +val directive_table : (string, directive_fun) Hashtbl.t (* Table of known directives, with their execution function *) -val toplevel_env: Env.t ref +val toplevel_env : Env.t ref (* Typing environment for the toplevel *) -val print_exception_outcome: exn -> unit +val print_exception_outcome : formatter -> exn -> unit (* Print an exception resulting from the evaluation of user code. *) -val execute_phrase: bool -> Parsetree.toplevel_phrase -> bool +val execute_phrase : bool -> formatter -> Parsetree.toplevel_phrase -> bool (* Execute the given toplevel phrase. Return [true] if the phrase executed with no errors and [false] otherwise. First bool says whether the values and types of the results should be printed. Uncaught exceptions are always printed. *) -val use_file: string -> bool -val use_silently: string -> bool +val use_file : formatter -> string -> bool +val use_silently : formatter -> string -> bool (* Read and execute commands from a file. [use_file] prints the types and values of the results. [use_silently] does not print them. *) @@ -51,6 +53,6 @@ val use_silently: string -> bool val parse_toplevel_phrase : (Lexing.lexbuf -> Parsetree.toplevel_phrase) ref val parse_use_file : (Lexing.lexbuf -> Parsetree.toplevel_phrase list) ref -val print_location : Location.t -> unit -val print_warning : Location.t -> Warnings.t -> unit +val print_location : formatter -> Location.t -> unit +val print_warning : Location.t -> formatter -> Warnings.t -> unit val input_name : string ref |
