aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorppedrot2012-11-08 17:11:32 +0000
committerppedrot2012-11-08 17:11:32 +0000
commitbafb198e539998a4a64b2045a7e85125890f196e (patch)
tree7f8dfe2f0df9a22be8ff6e14952cd18c8579d181
parent5d87bcbb365e3fbdc0070abb31ab256b0f815165 (diff)
Added an Int module with dummy utility functions.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15956 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--checker/check.mllib1
-rw-r--r--dev/printers.mllib2
-rw-r--r--grammar/grammar.mllib1
-rw-r--r--lib/clib.mllib1
-rw-r--r--lib/int.ml15
-rw-r--r--lib/int.mli17
6 files changed, 37 insertions, 0 deletions
diff --git a/checker/check.mllib b/checker/check.mllib
index ea3cb6a8a3..bd3c5e00f2 100644
--- a/checker/check.mllib
+++ b/checker/check.mllib
@@ -1,4 +1,5 @@
Coq_config
+Int
Pp_control
Flags
Pp
diff --git a/dev/printers.mllib b/dev/printers.mllib
index 6f34dbb094..f0221a9c51 100644
--- a/dev/printers.mllib
+++ b/dev/printers.mllib
@@ -1,5 +1,6 @@
Coq_config
+Int
Pp_control
Loc
Compat
@@ -107,6 +108,7 @@ Pretyping
Declaremods
Tok
+Int
Lexer
Ppextend
Pputils
diff --git a/grammar/grammar.mllib b/grammar/grammar.mllib
index 7d91550df4..ee1bb32584 100644
--- a/grammar/grammar.mllib
+++ b/grammar/grammar.mllib
@@ -1,5 +1,6 @@
Coq_config
+Int
Pp_control
Flags
Pp
diff --git a/lib/clib.mllib b/lib/clib.mllib
index ca0e97bb06..f5fd721135 100644
--- a/lib/clib.mllib
+++ b/lib/clib.mllib
@@ -1,3 +1,4 @@
+Int
Pp_control
Pp
Coq_config
diff --git a/lib/int.ml b/lib/int.ml
new file mode 100644
index 0000000000..19cdfac0a6
--- /dev/null
+++ b/lib/int.ml
@@ -0,0 +1,15 @@
+(************************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2012 *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(************************************************************************)
+
+type t = int
+
+external equal : int -> int -> bool = "%eq"
+
+external compare : int -> int -> int = "caml_int_compare"
+
+let hash i = i land max_int
diff --git a/lib/int.mli b/lib/int.mli
new file mode 100644
index 0000000000..ae1a32dc87
--- /dev/null
+++ b/lib/int.mli
@@ -0,0 +1,17 @@
+(************************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2012 *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(************************************************************************)
+
+(** A native integer module with usual utility functions. *)
+
+type t = int
+
+external equal : t -> t -> bool = "%eq"
+
+external compare : t -> t -> int = "caml_int_compare"
+
+val hash : t -> int