diff --git a/README.adoc b/README.adoc index d3f40103..8c8286b0 100644 --- a/README.adoc +++ b/README.adoc @@ -117,6 +117,8 @@ Documentation http://cedeela.fr/~simon/software/containers[here]. - `CCError` (monadic error handling, very useful) - `CCIO`, basic utilities for IO (channels, files) - `CCInt64,` utils for `int64` +- `CCChar`, utils for `char` +- `CCFormat`, pretty-printing utils around `Format` === Containers.data diff --git a/_oasis b/_oasis index dcde30ca..e3782bc7 100644 --- a/_oasis +++ b/_oasis @@ -45,8 +45,8 @@ Library "containers" Path: src/core Modules: CCVector, CCPrint, CCError, CCHeap, CCList, CCOpt, CCPair, CCFun, CCHash, CCInt, CCBool, CCFloat, CCArray, CCRef, CCSet, - CCOrd, CCRandom, CCString, CCHashtbl, CCMap, CCFormat, CCIO, CCInt64, - Containers + CCOrd, CCRandom, CCString, CCHashtbl, CCMap, CCFormat, CCIO, + CCInt64, CCChar, Containers BuildDepends: bytes # BuildDepends: bytes, bisect_ppx diff --git a/doc/intro.txt b/doc/intro.txt index 36fb49ce..45adfe72 100644 --- a/doc/intro.txt +++ b/doc/intro.txt @@ -25,6 +25,7 @@ by ocamlfind). {!modules: CCArray CCBool +CCChar CCError CCFloat CCFun diff --git a/src/core/CCChar.ml b/src/core/CCChar.ml new file mode 100644 index 00000000..563bc962 --- /dev/null +++ b/src/core/CCChar.ml @@ -0,0 +1,14 @@ +(* This file is free software, part of containers. See file "license" for more details. *) + +(** {1 Utils around char} + + @since NEXT_RELEASE *) + +type t = char + +let equal (a:char) b = a=b +let compare = Char.compare + +let print = Format.pp_print_char + + diff --git a/src/core/CCChar.mli b/src/core/CCChar.mli new file mode 100644 index 00000000..c5af32c4 --- /dev/null +++ b/src/core/CCChar.mli @@ -0,0 +1,14 @@ + +(* This file is free software, part of containers. See file "license" for more details. *) + +(** {1 Utils around char} + + @since NEXT_RELEASE *) + +type t = char + +val equal : t -> t -> bool +val compare : t -> t -> int + +val print : Format.formatter -> t -> unit +