aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-06-15 11:52:19 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-06-15 11:52:19 +0200
commit28c732ea340f5ac571a77a8ac26de600c29165b2 (patch)
tree9ee6deb6ecb31c520ffb4c278560a527cb550db4 /lib
parente710306910afc61c9a874e6020bbf35b77ffe4af (diff)
parent7668037a8daaef7bc8f1fc3225c2e6cc26cac0aa (diff)
Merge PR#375: Deprecation
Diffstat (limited to 'lib')
-rw-r--r--lib/flags.ml34
-rw-r--r--lib/flags.mli2
2 files changed, 14 insertions, 22 deletions
diff --git a/lib/flags.ml b/lib/flags.ml
index 6a3b7a426..13539bced 100644
--- a/lib/flags.ml
+++ b/lib/flags.ml
@@ -106,35 +106,27 @@ let we_are_parsing = ref false
(* Current means no particular compatibility consideration.
For correct comparisons, this constructor should remain the last one. *)
-type compat_version = V8_2 | V8_3 | V8_4 | V8_5 | V8_6 | Current
+type compat_version = VOld | V8_5 | V8_6 | Current
let compat_version = ref Current
let version_compare v1 v2 = match v1, v2 with
-| V8_2, V8_2 -> 0
-| V8_2, (V8_3 | V8_4 | V8_5 | V8_6 | Current) -> -1
-| V8_3, V8_2 -> 1
-| V8_3, V8_3 -> 0
-| V8_3, (V8_4 | V8_5 | V8_6 | Current) -> -1
-| V8_4, (V8_2 | V8_3) -> 1
-| V8_4, V8_4 -> 0
-| V8_4, (V8_5 | V8_6 | Current) -> -1
-| V8_5, (V8_2 | V8_3 | V8_4) -> 1
-| V8_5, V8_5 -> 0
-| V8_5, (V8_6 | Current) -> -1
-| V8_6, (V8_2 | V8_3 | V8_4 | V8_5) -> 1
-| V8_6, V8_6 -> 0
-| V8_6, Current -> -1
-| Current, Current -> 0
-| Current, (V8_2 | V8_3 | V8_4 | V8_5 | V8_6) -> 1
+ | VOld, VOld -> 0
+ | VOld, _ -> -1
+ | _, VOld -> 1
+ | V8_5, V8_5 -> 0
+ | V8_5, _ -> -1
+ | _, V8_5 -> 1
+ | V8_6, V8_6 -> 0
+ | V8_6, _ -> -1
+ | _, V8_6 -> 1
+ | Current, Current -> 0
let version_strictly_greater v = version_compare !compat_version v > 0
let version_less_or_equal v = not (version_strictly_greater v)
let pr_version = function
- | V8_2 -> "8.2"
- | V8_3 -> "8.3"
- | V8_4 -> "8.4"
+ | VOld -> "old"
| V8_5 -> "8.5"
| V8_6 -> "8.6"
| Current -> "current"
@@ -157,7 +149,7 @@ let is_verbose () = not !quiet
let auto_intros = ref true
let make_auto_intros flag = auto_intros := flag
-let is_auto_intros () = version_strictly_greater V8_2 && !auto_intros
+let is_auto_intros () = !auto_intros
let universe_polymorphism = ref false
let make_universe_polymorphism b = universe_polymorphism := b
diff --git a/lib/flags.mli b/lib/flags.mli
index e2cf09474..0026aba2e 100644
--- a/lib/flags.mli
+++ b/lib/flags.mli
@@ -77,7 +77,7 @@ val raw_print : bool ref
(* Univ print flag, never set anywere. Maybe should belong to Univ? *)
val univ_print : bool ref
-type compat_version = V8_2 | V8_3 | V8_4 | V8_5 | V8_6 | Current
+type compat_version = VOld | V8_5 | V8_6 | Current
val compat_version : compat_version ref
val version_compare : compat_version -> compat_version -> int
val version_strictly_greater : compat_version -> bool