aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2016-09-26 11:31:39 +0200
committerGravatar Matej Kosik <matej.kosik@inria.fr>2016-09-28 16:32:51 +0200
commitd88b51aea64199a7670d2804694832c66ee35518 (patch)
tree50c82adc406ed454c23dcecbdd16152ad828c728 /lib
parent0b218382841f56408558a09bc7de823319ac8772 (diff)
Add a compatibility flag for 8.6 and refactor.
Diffstat (limited to 'lib')
-rw-r--r--lib/flags.ml24
-rw-r--r--lib/flags.mli2
2 files changed, 15 insertions, 11 deletions
diff --git a/lib/flags.ml b/lib/flags.ml
index 13525165a..df00eba7b 100644
--- a/lib/flags.ml
+++ b/lib/flags.ml
@@ -108,20 +108,23 @@ 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 | Current
+type compat_version = V8_2 | V8_3 | V8_4 | V8_5 | V8_6 | Current
let compat_version = ref Current
let version_strictly_greater v = match !compat_version, v with
-| V8_2, (V8_2 | V8_3 | V8_4 | V8_5 | Current) -> false
-| V8_3, (V8_3 | V8_4 | V8_5 | Current) -> false
-| V8_4, (V8_4 | V8_5 | Current) -> false
-| V8_5, (V8_5 | Current) -> false
-| Current, Current -> false
-| V8_3, V8_2 -> true
-| V8_4, (V8_2 | V8_3) -> true
-| V8_5, (V8_2 | V8_3 | V8_4) -> true
-| Current, (V8_2 | V8_3 | V8_4 | V8_5) -> true
+| _ , Current -> false
+| Current , _ -> true
+| _ , V8_6 -> false
+| V8_6 , _ -> true
+| _ , V8_5 -> false
+| V8_5 , _ -> true
+| _ , V8_4 -> false
+| V8_4 , _ -> true
+| _ , V8_3 -> false
+| v8_3 , _ -> true
+| V8_2 , V8_2 -> false
+
let version_less_or_equal v = not (version_strictly_greater v)
@@ -130,6 +133,7 @@ let pr_version = function
| V8_3 -> "8.3"
| V8_4 -> "8.4"
| V8_5 -> "8.5"
+ | V8_6 -> "8.6"
| Current -> "current"
(* Translate *)
diff --git a/lib/flags.mli b/lib/flags.mli
index 8fe64d24f..e498dc6b5 100644
--- a/lib/flags.mli
+++ b/lib/flags.mli
@@ -62,7 +62,7 @@ val raw_print : bool ref
val record_print : bool ref
val univ_print : bool ref
-type compat_version = V8_2 | V8_3 | V8_4 | V8_5 | Current
+type compat_version = V8_2 | V8_3 | V8_4 | V8_5 | V8_6 | Current
val compat_version : compat_version ref
val version_strictly_greater : compat_version -> bool
val version_less_or_equal : compat_version -> bool