mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 03:35:30 -05:00
specialize some comparison functions
This commit is contained in:
parent
b878909d3c
commit
f1f8842436
3 changed files with 5 additions and 5 deletions
|
|
@ -26,9 +26,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
type t = bool
|
||||
|
||||
let equal a b = a=b
|
||||
let equal (a:bool) b = a=b
|
||||
|
||||
let compare a b = Pervasives.compare a b
|
||||
let compare (a:bool) b = Pervasives.compare a b
|
||||
|
||||
let negate x = not x
|
||||
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
type t = int
|
||||
|
||||
let equal a b = a=b
|
||||
let equal (a:int) b = a=b
|
||||
|
||||
let compare a b = Pervasives.compare a b
|
||||
let compare (a:int) b = Pervasives.compare a b
|
||||
|
||||
let hash i = i land max_int
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ end
|
|||
|
||||
type t = string
|
||||
|
||||
let equal a b = a=b
|
||||
let equal (a:string) b = a=b
|
||||
|
||||
let compare = String.compare
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue