diff options
| author | Xavier Leroy <xavier.leroy@inria.fr> | 1999-02-24 15:21:50 +0000 |
|---|---|---|
| committer | Xavier Leroy <xavier.leroy@inria.fr> | 1999-02-24 15:21:50 +0000 |
| commit | 5038f3cdb6377dfc84e4642b710c1a1949060e1d (patch) | |
| tree | 5d40d3f38506e477142555e1a22fa860236f566c /toplevel | |
| parent | 6fb83c93fcf5a7687ebaf084daf3933ff23c22e9 (diff) | |
| download | ocaml-5038f3cdb6377dfc84e4642b710c1a1949060e1d.tar.gz | |
Ajout de Pervasives.ignore. List.remove -> List.remove_ass*
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2304 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'toplevel')
| -rw-r--r-- | toplevel/topdirs.ml | 4 | ||||
| -rw-r--r-- | toplevel/toploop.ml | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/toplevel/topdirs.ml b/toplevel/topdirs.ml index 57ea804302..3437f68977 100644 --- a/toplevel/topdirs.ml +++ b/toplevel/topdirs.ml @@ -68,7 +68,7 @@ let load_compunit ic filename compunit = Symtable.patch_object code compunit.cu_reloc; Symtable.update_global_table(); begin try - let _ = (Meta.reify_bytecode code code_size) () in () + ignore((Meta.reify_bytecode code code_size) ()) with exn -> Symtable.restore_state initial_symtable; print_exception_outcome exn; @@ -106,7 +106,7 @@ let _ = Hashtbl.add directive_table "load" (Directive_string dir_load) (* Load commands from a file *) -let dir_use name = let _ = Toploop.use_file name in () +let dir_use name = ignore(Toploop.use_file name) let _ = Hashtbl.add directive_table "use" (Directive_string dir_use) diff --git a/toplevel/toploop.ml b/toplevel/toploop.ml index e5619012a3..4551f64653 100644 --- a/toplevel/toploop.ml +++ b/toplevel/toploop.ml @@ -208,7 +208,7 @@ let use_file name = (* Skip initial #! line if any *) let buffer = String.create 2 in if input ic buffer 0 2 = 2 && buffer = "#!" - then let _ = input_line ic in () + then ignore(input_line ic) else seek_in ic 0; let success = protect Location.input_name filename (fun () -> @@ -272,8 +272,7 @@ let _ = Compile.init_path() let load_ocamlinit () = - if Sys.file_exists ".ocamlinit" then let _ = use_silently ".ocamlinit" in () - + if Sys.file_exists ".ocamlinit" then ignore(use_silently ".ocamlinit") (* The interactive loop *) @@ -299,7 +298,7 @@ let loop() = Location.reset(); first_line := true; let phr = try !parse_toplevel_phrase lb with Exit -> raise PPerror in - let _ = execute_phrase true phr in () + ignore(execute_phrase true phr) with End_of_file -> exit 0 | Sys.Break -> |
