diff options
| author | Hugo Herbelin | 2015-12-10 12:32:56 +0100 |
|---|---|---|
| committer | Hugo Herbelin | 2015-12-14 16:58:34 +0100 |
| commit | f439001caa24671d03d8816964ceb8e483660e70 (patch) | |
| tree | 4ea39f85b7a83c844aa3c2c01340d2324e382fe1 | |
| parent | d58957f63d36e2da41f6f839a2d94cb0db4c8125 (diff) | |
Adding compatibility flag for 8.5.
Soon needing a more algebraic view at version numbers...
| -rw-r--r-- | lib/flags.ml | 13 | ||||
| -rw-r--r-- | lib/flags.mli | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lib/flags.ml b/lib/flags.ml index 9a0d4b5ec1..96415ed263 100644 --- a/lib/flags.ml +++ b/lib/flags.ml @@ -101,18 +101,20 @@ 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 | Current +type compat_version = V8_2 | V8_3 | V8_4 | V8_5 | Current let compat_version = ref Current let version_strictly_greater v = match !compat_version, v with -| V8_2, (V8_2 | V8_3 | V8_4 | Current) -> false -| V8_3, (V8_3 | V8_4 | Current) -> false -| V8_4, (V8_4 | Current) -> false +| 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 -| Current, (V8_2 | V8_3 | V8_4) -> true +| V8_5, (V8_2 | V8_3 | V8_4) -> true +| Current, (V8_2 | V8_3 | V8_4 | V8_5) -> true let version_less_or_equal v = not (version_strictly_greater v) @@ -120,6 +122,7 @@ let pr_version = function | V8_2 -> "8.2" | V8_3 -> "8.3" | V8_4 -> "8.4" + | V8_5 -> "8.5" | Current -> "current" (* Translate *) diff --git a/lib/flags.mli b/lib/flags.mli index 29a0bbef01..cb92e1462d 100644 --- a/lib/flags.mli +++ b/lib/flags.mli @@ -55,7 +55,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 | Current +type compat_version = V8_2 | V8_3 | V8_4 | V8_5 | Current val compat_version : compat_version ref val version_strictly_greater : compat_version -> bool val version_less_or_equal : compat_version -> bool |
