From fc6d0fb650f57a764af6fe9be44677a69be11980 Mon Sep 17 00:00:00 2001 From: Arnaud Spiwack Date: Thu, 19 Feb 2015 16:41:51 +0100 Subject: New function [Constr.equal_with] to compare terms up to variants of [kind_of_term]. To be able to write equality up to evar instantiation instantiation. Generalises the main function of [eq] constr over the variant of [kind_of_term] it uses. It prevents some optimisation of [Array.equal] where two physically equal arrays are considered (less or) equal. But it does not seem to have appreciable effects on efficiency. --- lib/cArray.mli | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/cArray.mli') diff --git a/lib/cArray.mli b/lib/cArray.mli index 39c35e2d5..7e5c93b5d 100644 --- a/lib/cArray.mli +++ b/lib/cArray.mli @@ -17,6 +17,11 @@ sig val equal : ('a -> 'a -> bool) -> 'a array -> 'a array -> bool (** Lift equality to array type. *) + val equal_norefl : ('a -> 'a -> bool) -> 'a array -> 'a array -> bool + (** Like {!equal} but does not assume that equality is reflexive: no + optimisation is performed if both arrays are physically the + same. *) + val is_empty : 'a array -> bool (** True whenever the array is empty. *) -- cgit v1.2.3