aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorletouzey2010-06-01 14:28:55 +0000
committerletouzey2010-06-01 14:28:55 +0000
commit2a6f8b280353e44a87ba9da7ad0a73044c75ed49 (patch)
tree7cec80eb8b3ff03f60c415f92929fc52dd7eba8e
parentfb78828587a7ff9e39b3f1eaa1cf0786c7adf81e (diff)
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
-rw-r--r--checker/checker.ml26
-rw-r--r--toplevel/cerrors.ml26
2 files changed, 16 insertions, 36 deletions
diff --git a/checker/checker.ml b/checker/checker.ml
index 67691a7066..1aad3e9117 100644
--- a/checker/checker.ml
+++ b/checker/checker.ml
@@ -238,14 +238,9 @@ let rec explain_exn = function
| Anomaly (s,pps) ->
hov 1 (anomaly_string () ++ where s ++ pps ++ report ())
| Match_failure(filename,pos1,pos2) ->
- hov 1 (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 ())
+ hov 1 (anomaly_string () ++ str "Match failure in file " ++
+ str (guill filename) ++ str " at line " ++ int pos1 ++
+ str " character " ++ int pos2 ++ report ())
| Not_found ->
hov 0 (anomaly_string () ++ str "uncaught exception Not_found" ++ report ())
| Failure s ->
@@ -279,16 +274,11 @@ let rec explain_exn = function
++ explain_exn 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 ())
| reraise ->
hov 0 (anomaly_string () ++ str "Uncaught exception " ++
diff --git a/toplevel/cerrors.ml b/toplevel/cerrors.ml
index 24e770d10b..6dcc02097b 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 ".")