summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Weis <Pierre.Weis@inria.fr>2010-01-10 20:06:04 +0000
committerPierre Weis <Pierre.Weis@inria.fr>2010-01-10 20:06:04 +0000
commiteed442b92a74ee6cb875f514a8f9c719eea300a9 (patch)
tree5bd54377e83cfaa700179cf360ba2ea0ef7ef32b
parent5d71337b579a0a7dbe25f88fa55dac56ab522df0 (diff)
downloadocaml-eed442b92a74ee6cb875f514a8f9c719eea300a9.tar.gz
FIXME are removed: we got a stable compiler now.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/dothat@9517 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--driver/errors.ml2
-rw-r--r--tools/ocamldep.ml16
-rw-r--r--tools/ocamlprof.ml16
-rw-r--r--typing/oprint.ml4
4 files changed, 14 insertions, 24 deletions
diff --git a/driver/errors.ml b/driver/errors.ml
index 6d40bdecc3..22dd1fc6a0 100644
--- a/driver/errors.ml
+++ b/driver/errors.ml
@@ -70,11 +70,9 @@ let report_error ppf exn =
| Bytepackager.Error code ->
Location.print_error_cur_file ppf;
Bytepackager.report_error ppf code
-(* FIXME should restore this code!
| Sys_error msg ->
Location.print_error_cur_file ppf;
fprintf ppf "I/O error: %s" msg
-*)
| Warnings.Errors (n) ->
Location.print_error_cur_file ppf;
fprintf ppf "Error-enabled warnings (%d occurrences)" n
diff --git a/tools/ocamldep.ml b/tools/ocamldep.ml
index ecbb4ee656..30dd9c39c2 100644
--- a/tools/ocamldep.ml
+++ b/tools/ocamldep.ml
@@ -44,7 +44,7 @@ let add_to_load_path dir =
let contents = Sys.readdir dir in
load_path := !load_path @ [dir, contents]
with Sys_error msg ->
- fprintf Format.err_formatter "@[Bad -I option: %s@]@." msg;
+ eprintf "@[Bad -I option: %s@]@." msg;
error_occurred := true
let find_file name =
@@ -249,18 +249,14 @@ let file_dependencies_as kind source_file =
with x ->
let report_err = function
| Lexer.Error(err, range) ->
- fprintf Format.err_formatter "@[%a%a@]@."
- Location.print_error range Lexer.report_error err
+ eprintf "@[%a%a@]@."
+ Location.print_error range Lexer.report_error err
| Syntaxerr.Error err ->
- fprintf Format.err_formatter "@[%a@]@."
- Syntaxerr.report_error err
-(* FIXME: should restore this code!
+ eprintf "@[%a@]@." Syntaxerr.report_error err
| Sys_error msg ->
- fprintf Format.err_formatter "@[I/O error:@ %s@]@." msg
+ eprintf "@[I/O error:@ %s@]@." msg
| Preprocessing_error ->
- fprintf Format.err_formatter "@[Preprocessing error on file %s@]@."
- source_file
-*)
+ eprintf "@[Preprocessing error on file %s@]@." source_file
| x -> raise x in
error_occurred := true;
report_err x
diff --git a/tools/ocamlprof.ml b/tools/ocamlprof.ml
index 73e49bd445..70ef90dea2 100644
--- a/tools/ocamlprof.ml
+++ b/tools/ocamlprof.ml
@@ -480,19 +480,17 @@ let main () =
with x ->
let report_error ppf = function
| Lexer.Error(err, range) ->
- fprintf ppf "@[%a%a@]@."
- Location.print_error range Lexer.report_error err
+ Format.eprintf "@[%a%a@]@."
+ Location.print_error range Lexer.report_error err
| Syntaxerr.Error err ->
- fprintf ppf "@[%a@]@."
- Syntaxerr.report_error err
-(* FIXME should restore this code!
+ eprintf ppf "@[%a@]@." Syntaxerr.report_error err
| Profiler msg ->
- fprintf ppf "@[%s@]@." msg
+ eprintf "@[%s@]@." msg
| Sys_error msg ->
- fprintf ppf "@[I/O error:@ %s@]@." msg
-*)
+ eprintf "@[I/O error:@ %s@]@." msg
| x -> raise x in
- report_error Format.err_formatter x;
+
+ report_error x;
exit 2
let _ = main ()
diff --git a/typing/oprint.ml b/typing/oprint.ml
index 32915f002d..511ba794a5 100644
--- a/typing/oprint.ml
+++ b/typing/oprint.ml
@@ -465,11 +465,9 @@ let _ = out_sig_item := print_out_sig_item
(* Phrases *)
-(* FIXME *)
-open Sys;;
let print_out_exception ppf exn outv =
match exn with
- Break -> fprintf ppf "Interrupted.@."
+ | Sys.Break -> fprintf ppf "Interrupted.@."
| Out_of_memory -> fprintf ppf "Out of memory during evaluation.@."
| Stack_overflow ->
fprintf ppf "Stack overflow during evaluation (looping recursion?).@."