From 2a6f8b280353e44a87ba9da7ad0a73044c75ed49 Mon Sep 17 00:00:00 2001 From: letouzey Date: Tue, 1 Jun 2010 14:28:55 +0000 Subject: Cleanup: remove code specific for ocaml 3.06 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13045 85f007b7-540e-0410-9357-904b9bb8a0f7 --- toplevel/cerrors.ml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'toplevel') diff --git a/toplevel/cerrors.ml b/toplevel/cerrors.ml index 24e770d10..6dcc02097 100644 --- a/toplevel/cerrors.ml +++ b/toplevel/cerrors.ml @@ -52,14 +52,9 @@ let rec explain_exn_default_aux anomaly_string report_fn = function hov 0 (anomaly_string () ++ str s ++ str ". Received exception is:" ++ fnl() ++ explain_exn_default_aux anomaly_string report_fn exc) | Match_failure(filename,pos1,pos2) -> - hov 0 (anomaly_string () ++ str "Match failure in file " ++ str (guill filename) ++ - if Sys.ocaml_version = "3.06" then - (str " from character " ++ int pos1 ++ - str " to " ++ int pos2) - else - (str " at line " ++ int pos1 ++ - str " character " ++ int pos2) - ++ report_fn ()) + hov 0 (anomaly_string () ++ str "Match failure in file " ++ + str (guill filename) ++ str " at line " ++ int pos1 ++ + str " character " ++ int pos2 ++ report_fn ()) | Not_found -> hov 0 (anomaly_string () ++ str "uncaught exception Not_found" ++ report_fn ()) | Failure s -> @@ -118,16 +113,11 @@ let rec explain_exn_default_aux anomaly_string report_fn = function ++ explain_exn_default_aux anomaly_string report_fn exc) | Assert_failure (s,b,e) -> hov 0 (anomaly_string () ++ str "assert failure" ++ spc () ++ - (if s <> "" then - if Sys.ocaml_version = "3.06" then - (str ("(file \"" ^ s ^ "\", characters ") ++ - int b ++ str "-" ++ int e ++ str ")") - else - (str ("(file \"" ^ s ^ "\", line ") ++ int b ++ - str ", characters " ++ int e ++ str "-" ++ - int (e+6) ++ str ")") - else - (mt ())) ++ + (if s = "" then mt () + else + (str ("(file \"" ^ s ^ "\", line ") ++ int b ++ + str ", characters " ++ int e ++ str "-" ++ + int (e+6) ++ str ")")) ++ report_fn ()) | AlreadyDeclared msg -> hov 0 (msg ++ str ".") -- cgit v1.2.3