diff options
| author | ppedrot | 2013-09-18 18:29:40 +0000 |
|---|---|---|
| committer | ppedrot | 2013-09-18 18:29:40 +0000 |
| commit | 33eea163c72c70eaa3bf76506c1d07a8cde911fd (patch) | |
| tree | 69eb4394fc0eb748fa16609e86dbf941234157d8 /kernel/evar.mli | |
| parent | 71a9b7f264721b8afe5081bb0e13bcf8759d8403 (diff) | |
At least made the evar type opaque! There are still 5 remaining unsafe
casts of ints to evars.
- 2 in Evarutil and Goal which are really needed, even though the Goal
one could (and should) be removed;
- 2 in G_xml and Detyping that are there for completeness sake, but
that might be made anomalies altogether;
- 1 in Newring which is quite dubious at best, and should be fixed.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16786 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/evar.mli')
| -rw-r--r-- | kernel/evar.mli | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/kernel/evar.mli b/kernel/evar.mli new file mode 100644 index 0000000000..8e8b88d942 --- /dev/null +++ b/kernel/evar.mli @@ -0,0 +1,31 @@ +(************************************************************************) +(* 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 *) +(************************************************************************) + +(** This module defines existential variables, which are isomorphic to [int]. + Nonetheless, casting from an [int] to a variable is deemed unsafe, so that + to keep track of such casts, one has to use the provided {!unsafe_of_int} + function. *) + +type t +(** Type of existential variables. *) + +val repr : t -> int +(** Recover the underlying integer. *) + +val unsafe_of_int : int -> t +(** This is not for dummies. Do not use this function if you don't know what you + are doing. *) + +val equal : t -> t -> bool +(** Equality over existential variables. *) + +val compare : t -> t -> int +(** Comparison over existential variables. *) + +module Set : Set.S with type elt = t +module Map : CMap.ExtS with type key = t and module Set := Set |
