diff options
| author | ppedrot | 2012-11-08 17:11:32 +0000 |
|---|---|---|
| committer | ppedrot | 2012-11-08 17:11:32 +0000 |
| commit | bafb198e539998a4a64b2045a7e85125890f196e (patch) | |
| tree | 7f8dfe2f0df9a22be8ff6e14952cd18c8579d181 /lib | |
| parent | 5d87bcbb365e3fbdc0070abb31ab256b0f815165 (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
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/clib.mllib | 1 | ||||
| -rw-r--r-- | lib/int.ml | 15 | ||||
| -rw-r--r-- | lib/int.mli | 17 |
3 files changed, 33 insertions, 0 deletions
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 |
