diff options
Diffstat (limited to 'lib/compat.ml4')
-rw-r--r-- | lib/compat.ml4 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/compat.ml4 b/lib/compat.ml4 new file mode 100644 index 00000000..5e1c65b4 --- /dev/null +++ b/lib/compat.ml4 @@ -0,0 +1,32 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +(* Compatibility file depending on ocaml version *) + +(* IFDEF not available in 3.06; use ifdef instead *) + +(* type loc is different in 3.08 *) +ifdef OCAML308 then +module M = struct +type loc = Token.flocation +let dummy_loc = Token.dummy_loc +let unloc (b,e) = (b.Lexing.pos_cnum,e.Lexing.pos_cnum) +let make_loc loc = Token.make_loc loc +end +else +module M = struct +type loc = int * int +let dummy_loc = (0,0) +let unloc x = x +let make_loc x = x +end + +type loc = M.loc +let dummy_loc = M.dummy_loc +let unloc = M.unloc +let make_loc = M.make_loc |