aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/int.ml
blob: 86d79fd3110a9acee7c8f0ca423bfba3e56182e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(************************************************************************)
(*  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

module Self =
struct
  type t = int
  let compare = compare
end

module Set = Set.Make(Self)
module Map = Map.Make(Self)