| 1 | (************************************************************************) |
| 2 | (* * The Rocq Prover / The Rocq Development Team *) |
| 3 | (* v * Copyright INRIA, CNRS and contributors *) |
| 4 | (* <O___,, * (see version control and CREDITS file for authors & dates) *) |
| 5 | (* \VV/ **************************************************************) |
| 6 | (* // * This file is distributed under the terms of the *) |
| 7 | (* * GNU Lesser General Public License Version 2.1 *) |
| 8 | (* * (see LICENSE file for the text of the license) *) |
| 9 | (************************************************************************) |
| 10 | |
| 11 | (** This module defines existential variables, which are isomorphic to [int]. |
| 12 | Nonetheless, casting from an [int] to a variable is deemed unsafe, so that |
| 13 | to keep track of such casts, one has to use the provided {!unsafe_of_int} |
| 14 | function. *) |
| 15 | |
| 16 | type t |
| 17 | (** Type of existential variables. *) |
| 18 | |
| 19 | val repr : t -> int |
| 20 | (** Recover the underlying integer. *) |
| 21 | |
| 22 | val unsafe_of_int : int -> t |
| 23 | (** This is not for dummies. Do not use this function if you don't know what you |
| 24 | are doing. *) |
| 25 | |
| 26 | val equal : t -> t -> bool |
| 27 | (** Equality over existential variables. *) |
| 28 | |
| 29 | val compare : t -> t -> int |
| 30 | (** Comparison over existential variables. *) |
| 31 | |
| 32 | val hash : t -> int |
| 33 | (** Hash over existential variables. *) |
| 34 | |
| 35 | val print : t -> Pp.t |
| 36 | (** Printing representation *) |
| 37 | |
| 38 | module Set : Set.S with type elt = t |
| 39 | module Map : CMap.ExtS with type key = t and module Set := Set |