diff options
| author | herbelin | 2009-10-04 10:50:39 +0000 |
|---|---|---|
| committer | herbelin | 2009-10-04 10:50:39 +0000 |
| commit | 3b57619bd5dc164dcb51ad4fb390efd258940917 (patch) | |
| tree | a86ebb8f52443374966b496de5b361166c4ed02d /lib | |
| parent | 88909c92cad0044dac83539b2b3d385242ed851e (diff) | |
Changed the way to support compatibility with previous versions.
Compatibility version is now a global parameter that every feature can
individually browse. This avoids having to keep the names of options
synchronous in their respective files and in now-removed file coqcompat.ml.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12372 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/flags.ml | 8 | ||||
| -rw-r--r-- | lib/flags.mli | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/flags.ml b/lib/flags.ml index da80130283..971b560ec2 100644 --- a/lib/flags.ml +++ b/lib/flags.ml @@ -37,6 +37,14 @@ let raw_print = ref false let unicode_syntax = ref false +(* Compatibility mode *) + +type compat_version = V8_2 +let compat_version = ref None +let version_strictly_greater v = + match !compat_version with None -> true | Some v' -> v'>v +let version_less_or_equal v = not (version_strictly_greater v) + (* Translate *) let beautify = ref false let make_beautify f = beautify := f diff --git a/lib/flags.mli b/lib/flags.mli index e8a7819c89..50ba923b74 100644 --- a/lib/flags.mli +++ b/lib/flags.mli @@ -29,6 +29,11 @@ val raw_print : bool ref val unicode_syntax : bool ref +type compat_version = V8_2 +val compat_version : compat_version option ref +val version_strictly_greater : compat_version -> bool +val version_less_or_equal : compat_version -> bool + val beautify : bool ref val make_beautify : bool -> unit val do_beautify : unit -> bool |
