diff --git a/README.md b/README.md index c355358c..fa00eab1 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,33 @@ ocaml-containers ================ -1. A usable, reasonably well-designed library that extends OCaml's standard - library (in `core/`, packaged under `containers` in ocamlfind. Modules - are totally independent and are prefixed with `CC` (for "containers-core" - or "companion-cube" because I'm megalomaniac). This part should be - usable and should work. For instance, `CCList` contains functions and - lists including safe versions of `map` and `append`. -2. A satellite library, `containers.string` (in directory `string`) with +- A usable, reasonably well-designed library that extends OCaml's standard + library (in `core/`, packaged under `containers` in ocamlfind. Modules + are totally independent and are prefixed with `CC` (for "containers-core" + or "companion-cube" because I'm megalomaniac). This part should be + usable and should work. For instance, `CCList` contains functions and + lists including safe versions of `map` and `append`. +- Several small additional libraries that completent it: + * `containers.data` with additional data structures that don't have an + equivalent in the standard library + * `containers.io` with utils to handle files and I/O streams + * `containers.iter` with list-like and tree-like iterators + * `containers.string` (in directory `string`) with a few packed modules that deal with strings (Levenshtein distance, KMP search algorithm, and a few naive utils). Again, modules are independent and sometimes parametric on the string and char types (so they should be able to deal with your favorite unicode library). -3. A drop-in replacement to the standard library, `containers.pervasives`, - that defined a `CCPervasives` module intented to be opened to extend some - modules of the stdlib. -4. A sub-library with complicated abstractions, `containers.advanced` (with - a LINQ-like query module, batch operations using GADTs, and others) -5. A library using [Lwt](https://github.com/ocsigen/lwt/), `containers.lwt`. - Currently only contains experimental, unstable stuff. -6. Random stuff, with *NO* *GUARANTEE* of even being barely usable or tested, - in other dirs (mostly `misc` but also `lwt` and `threads`). It's where I - tend to write code when I want to test some idea, so half the modules (at - least) are unfinished or don't really work. +- A drop-in replacement to the standard library, `containers.pervasives`, + that defined a `CCPervasives` module intented to be opened to extend some + modules of the stdlib. +- A sub-library with complicated abstractions, `containers.advanced` (with + a LINQ-like query module, batch operations using GADTs, and others) +- A library using [Lwt](https://github.com/ocsigen/lwt/), `containers.lwt`. + Currently only contains experimental, unstable stuff. +- Random stuff, with *NO* *GUARANTEE* of even being barely usable or tested, + in other dirs (mostly `misc` but also `lwt` and `threads`). It's where I + tend to write code when I want to test some idea, so half the modules (at + least) are unfinished or don't really work. Some of the modules have been moved to their own repository (e.g. `sequence`, `gen`, `qcheck`) and are on opam for great fun and profit. @@ -57,7 +62,7 @@ This code is free, under the BSD license. The design is mostly centered around polymorphism rather than functors. Such structures comprise (some modules in `misc/`, some other in `core/`): -### Core Structures +### Core Modules (extension of the standard library) the core library, `containers`, now depends on [cppo](https://github.com/mjambon/cppo) and `base-bytes` (provided @@ -66,35 +71,49 @@ by ocamlfind). Documentation [here](http://cedeela.fr/~simon/software/containers). - `CCHeap`, a purely functional heap structure. +- `CCVector`, a growable array (pure OCaml, no C) with mutability annotations +- `CCList`, functions on lists, including tail-recursive implementations of `map` and `append` and many other things +- `CCArray`, utilities on arrays and slices +- `CCHashtbl`, `CCMap` extensions of the standard modules `Hashtbl` and `Map` +- `CCInt` +- `CCString` (basic string operations) +- `CCPair` (cartesian products) +- `CCOpt` (options, very useful) +- `CCFun` (function combinators) +- `CCBool` +- `CCFloat` +- `CCOrd` (combinators for total orderings) +- `CCRandom` (combinators for random generators) +- `CCPrint` (printing combinators) +- `CCHash` (hashing combinators) +- `CCError` (monadic error handling, very useful) + +### Containers.data + +- `CCCache`, memoization caches, LRU, etc. +- `CCFlatHashtbl`, a flat (open-addressing) hashtable functorial implementation +- `CCTrie`, a prefix tree +- `CCMultimap` and `CCMultiset`, functors defining persistent structures - `CCFQueue`, a purely functional double-ended queue structure - `CCBV`, mutable bitvectors - `CCPersistentHashtbl`, a semi-persistent hashtable (similar to [persistent arrays](https://www.lri.fr/~filliatr/ftp/ocaml/ds/parray.ml.html)) -- `CCVector`, a growable array (pure OCaml, no C) with mutability annotations -- `CCGen` and `CCSequence`, generic iterators structures (with structural types so they can be defined in several places). They are also available in their own repository and opam packages (`gen` and `sequence`). Note that the `@since` annotations may not be accurate because of the use of `git subtree`. -- `CCKList`, a persistent iterator structure (akin to a lazy list) -- `CCList`, functions on lists, including tail-recursive implementations of `map` and `append` and many other things -- `CCArray`, utilities on arrays and slices -- `CCMultimap` and `CCMultiset`, functors defining persistent structures -- `CCHashtbl`, `CCMap` extensions of the standard modules `Hashtbl` and `Map` -- `CCFlatHashtbl`, a flat (open-addressing) hashtable functorial implementation -- `CCKTree`, an abstract lazy tree structure (similar to what `CCKlist` is to lists) -- `CCTrie`, a prefix tree -- small modules (basic types, utilities): - - `CCInt` - - `CCString` (basic string operations) - - `CCPair` (cartesian products) - - `CCOpt` (options, very useful) - - `CCFun` (function combinators) - - `CCBool` - - `CCFloat` - - `CCOrd` (combinators for total orderings) - - `CCRandom` (combinators for random generators) - - `CCPrint` (printing combinators) - - `CCHash` (hashing combinators) - - `CCError` (monadic error handling, very useful) -- `CCSexp`, a small S-expression library + +### Containers.io + - `CCIO`, basic utilities for IO -- `CCCache`, memoization caches, LRU, etc. + +### Containers.sexp + +A small S-expression library. + +- `CCSexp`, a small S-expression library + +### Containers.iter + +Iterators: + +- `CCKList`, a persistent iterator structure (akin to a lazy list, without memoization) +- `CCKTree`, an abstract lazy tree structure ### String