module Kwdbm:sig
..end
Dbm
module.
It's against my policy to have this library depend on any 3rd-party libraries whose absence might prevent its compilation. I also want to avoid the complexities of conditional compilation.
So, the module is functorized to push the dependency on dbm
into the app that needs this module.
Even though the Ocaml dbm library is part of the official Ocaml
distribution, it typically depends on the system's libgdb.so
shared library, and if so, when that shared lib is upgraded, you
can be forced to recompile or at least relink the Ocaml Dbm
module. If Kw
inherits this dependency, you can be prevented
from compiling Ocaml code that doesn't even use Dbm
.
Hence the functor.
To use this module, just say:
module Kwdbm = Kwdbm.Make (Dbm)
module type DbmType =sig
..end
Make
.
module Make:
Dbm
.