aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2003-10-28 19:28:45 +0000
committerherbelin2003-10-28 19:28:45 +0000
commit8c5bf5b42f298871f6aa5b1ca5ad6feada7537c7 (patch)
tree06f12d109ce331c9b11ee4e9cbf0092606e4f3e4
parenta9fe19e2fa8f2c8b9d06f2053e0f08cf52317705 (diff)
Affichage Assert_failure en ocaml 3.07
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4731 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--toplevel/cerrors.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/toplevel/cerrors.ml b/toplevel/cerrors.ml
index d0be357d5d..97ab8a9b74 100644
--- a/toplevel/cerrors.ml
+++ b/toplevel/cerrors.ml
@@ -105,8 +105,13 @@ let rec explain_exn_default = function
| Assert_failure (s,b,e) ->
hov 0 (str "Anomaly: assert failure" ++ spc () ++
(if s <> "" then
- (str ("(file \"" ^ s ^ "\", characters ") ++
+ 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 ())) ++
report ())