From 473022956cef1c63ba484ae5badab5c15c3b622e Mon Sep 17 00:00:00 2001 From: Jacques-Pascal Deplaix Date: Mon, 6 Nov 2017 20:43:12 +0100 Subject: [PATCH] Shadow unsafe functions and operators from Pervasives --- _oasis | 2 +- _tags | 1 + src/core/CCPervasives.ml | 4 ++++ src/core/CCPervasives.mli | 16 ++++++++++++++++ src/core/containers.ml | 2 ++ 5 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/core/CCPervasives.ml create mode 100644 src/core/CCPervasives.mli diff --git a/_oasis b/_oasis index aabfca6a..a9b0e648 100644 --- a/_oasis +++ b/_oasis @@ -42,7 +42,7 @@ Library "containers" CCFun, CCHash, CCInt, CCBool, CCFloat, CCArray, CCRef, CCSet, CCOrd, CCRandom, CCString, CCHashtbl, CCMap, CCFormat, CCIO, CCInt64, CCChar, CCResult, CCParse, CCArray_slice, - CCListLabels, CCArrayLabels, CCEqual, + CCListLabels, CCArrayLabels, CCEqual, CCPervasives, Containers BuildDepends: bytes, result # BuildDepends: bytes, bisect_ppx diff --git a/_tags b/_tags index 08c6f6f5..d482d357 100644 --- a/_tags +++ b/_tags @@ -161,3 +161,4 @@ true: annot, bin_annot and not : warn(+a-4-44-58-60@8) true: no_alias_deps, safe_string, short_paths : nolabels +not : open(CCPervasives) diff --git a/src/core/CCPervasives.ml b/src/core/CCPervasives.ml new file mode 100644 index 00000000..ac3ff290 --- /dev/null +++ b/src/core/CCPervasives.ml @@ -0,0 +1,4 @@ + +(* This file is free software, part of containers. See file "license" for more details. *) + +include Pervasives diff --git a/src/core/CCPervasives.mli b/src/core/CCPervasives.mli new file mode 100644 index 00000000..5ade3df0 --- /dev/null +++ b/src/core/CCPervasives.mli @@ -0,0 +1,16 @@ + +(* This file is free software, part of containers. See file "license" for more details. *) + +(** {1 Shadow unsafe functions and operators from Pervasives} *) +(** @since NEXT_RELEASE *) + +val (=) : int -> int -> bool +val (<>) : int -> int -> bool +val (<) : int -> int -> bool +val (>) : int -> int -> bool +val (<=) : int -> int -> bool +val (>=) : int -> int -> bool + +val compare : int -> int -> int +val min : int -> int -> int +val max : int -> int -> int diff --git a/src/core/containers.ml b/src/core/containers.ml index 6c3234b5..32624d62 100644 --- a/src/core/containers.ml +++ b/src/core/containers.ml @@ -57,3 +57,5 @@ module Set = struct end module String = CCString module Vector = CCVector + +include CCPervasives