summaryrefslogtreecommitdiff
path: root/toplevel/toploop.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1995-09-02 18:55:37 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1995-09-02 18:55:37 +0000
commit7e691c81a692de687612225e0485f9b882b1ca5f (patch)
tree3a5eb6226433376e97963fbfdfbdb0293337f38e /toplevel/toploop.ml
parent756ae5b3261705296e960415f48dc8f372d4404d (diff)
downloadocaml-7e691c81a692de687612225e0485f9b882b1ca5f.tar.gz
Meilleur traitement des variables non generalisables.
Divers nettoyages pendant l'ecriture de la doc. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@239 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'toplevel/toploop.ml')
-rw-r--r--toplevel/toploop.ml22
1 files changed, 13 insertions, 9 deletions
diff --git a/toplevel/toploop.ml b/toplevel/toploop.ml
index 610e6b420e..c4cf14bc87 100644
--- a/toplevel/toploop.ml
+++ b/toplevel/toploop.ml
@@ -130,23 +130,27 @@ let execute_phrase phr =
close_box();
print_flush()
end;
- toplevel_env := newenv
+ toplevel_env := newenv;
+ true
| Exception exn ->
- print_exception_outcome exn
+ print_exception_outcome exn;
+ false
end
| Ptop_dir(dir_name, dir_arg) ->
try
match (Hashtbl.find directive_table dir_name, dir_arg) with
- (Directive_none f, Pdir_none) -> f ()
- | (Directive_string f, Pdir_string s) -> f s
- | (Directive_int f, Pdir_int n) -> f n
- | (Directive_ident f, Pdir_ident lid) -> f lid
+ (Directive_none f, Pdir_none) -> f (); true
+ | (Directive_string f, Pdir_string s) -> f s; true
+ | (Directive_int f, Pdir_int n) -> f n; true
+ | (Directive_ident f, Pdir_ident lid) -> f lid; true
| (_, _) ->
print_string "Wrong type of argument for directive `";
- print_string dir_name; print_string "'"; print_newline()
+ print_string dir_name; print_string "'"; print_newline();
+ false
with Not_found ->
print_string "Unknown directive `"; print_string dir_name;
- print_string "'"; print_newline()
+ print_string "'"; print_newline();
+ false
(* Reading function -- should use input_scan_line directly... *)
@@ -185,7 +189,7 @@ let loop() =
while true do
try
empty_lexbuf lb;
- execute_phrase (Parse.toplevel_phrase lb)
+ execute_phrase (Parse.toplevel_phrase lb); ()
with
End_of_file ->
print_newline(); exit 0