diff options
| author | Théo Zimmermann | 2019-11-13 15:50:39 +0100 |
|---|---|---|
| committer | Théo Zimmermann | 2019-12-02 17:23:22 +0100 |
| commit | 88fe0bcf86ad6cb95ffacfcd37f51fa3ae2da4fc (patch) | |
| tree | 05a0ed1f5d31789ea0457fe6caf5df0c95050c5e /lib | |
| parent | fcf5d724b5bd26581ecad6055ee33d2758133854 (diff) | |
Remove deprecated compat modifier of Notation / Infix commands.
And simplify a lot the compatibility infrastructure following this.
Update dev/tools/update-compat.py
Remove much complexity.
Co-authored-by: Jason Gross <jgross@mit.edu>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/flags.ml | 30 | ||||
| -rw-r--r-- | lib/flags.mli | 9 |
2 files changed, 1 insertions, 38 deletions
diff --git a/lib/flags.ml b/lib/flags.ml index 27ca8e9596..b87ba46634 100644 --- a/lib/flags.ml +++ b/lib/flags.ml @@ -57,36 +57,6 @@ let raw_print = ref false let we_are_parsing = ref false -(* Compatibility mode *) - -(* Current means no particular compatibility consideration. - For correct comparisons, this constructor should remain the last one. *) - -type compat_version = V8_9 | V8_10 | V8_11 | Current - -let compat_version = ref Current - -let version_compare v1 v2 = match v1, v2 with - | V8_9, V8_9 -> 0 - | V8_9, _ -> -1 - | _, V8_9 -> 1 - | V8_10, V8_10 -> 0 - | V8_10, _ -> -1 - | _, V8_10 -> 1 - | V8_11, V8_11 -> 0 - | V8_11, _ -> -1 - | _, V8_11 -> 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_9 -> "8.9" - | V8_10 -> "8.10" - | V8_11 -> "8.11" - | Current -> "current" - (* Translate *) let beautify = ref false let beautify_file = ref false diff --git a/lib/flags.mli b/lib/flags.mli index 36a996401d..86a922847f 100644 --- a/lib/flags.mli +++ b/lib/flags.mli @@ -14,7 +14,7 @@ This file is own its way to deprecation in favor of a purely functional state, but meanwhile it will contain options that are - truly global to the system such as [compat] or [debug] + truly global to the system such as [debug] If you are thinking about adding a global flag, well, just don't. First of all, options make testins exponentially more @@ -52,13 +52,6 @@ val we_are_parsing : bool ref (* Set Printing All flag. For some reason it is a global flag *) val raw_print : bool ref -type compat_version = V8_9 | V8_10 | V8_11 | Current -val compat_version : compat_version ref -val version_compare : compat_version -> compat_version -> int -val version_strictly_greater : compat_version -> bool -val version_less_or_equal : compat_version -> bool -val pr_version : compat_version -> string - (* Beautify command line flags, should move to printing? *) val beautify : bool ref val beautify_file : bool ref |
