new module CCChar

This commit is contained in:
Simon Cruanes 2015-10-13 15:09:52 +02:00
parent 22c205f1d4
commit c71dfcf6f3
5 changed files with 33 additions and 2 deletions

View file

@ -117,6 +117,8 @@ Documentation http://cedeela.fr/~simon/software/containers[here].
- `CCError` (monadic error handling, very useful) - `CCError` (monadic error handling, very useful)
- `CCIO`, basic utilities for IO (channels, files) - `CCIO`, basic utilities for IO (channels, files)
- `CCInt64,` utils for `int64` - `CCInt64,` utils for `int64`
- `CCChar`, utils for `char`
- `CCFormat`, pretty-printing utils around `Format`
=== Containers.data === Containers.data

4
_oasis
View file

@ -45,8 +45,8 @@ Library "containers"
Path: src/core Path: src/core
Modules: CCVector, CCPrint, CCError, CCHeap, CCList, CCOpt, CCPair, Modules: CCVector, CCPrint, CCError, CCHeap, CCList, CCOpt, CCPair,
CCFun, CCHash, CCInt, CCBool, CCFloat, CCArray, CCRef, CCSet, CCFun, CCHash, CCInt, CCBool, CCFloat, CCArray, CCRef, CCSet,
CCOrd, CCRandom, CCString, CCHashtbl, CCMap, CCFormat, CCIO, CCInt64, CCOrd, CCRandom, CCString, CCHashtbl, CCMap, CCFormat, CCIO,
Containers CCInt64, CCChar, Containers
BuildDepends: bytes BuildDepends: bytes
# BuildDepends: bytes, bisect_ppx # BuildDepends: bytes, bisect_ppx

View file

@ -25,6 +25,7 @@ by ocamlfind).
{!modules: {!modules:
CCArray CCArray
CCBool CCBool
CCChar
CCError CCError
CCFloat CCFloat
CCFun CCFun

14
src/core/CCChar.ml Normal file
View file

@ -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

14
src/core/CCChar.mli Normal file
View file

@ -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