4 ms·
In fact, OCaml modules do correspond to Haskell type class instances, and there are ways to extend the ML module system to support ad-hoc style polymorphism (ht
by namanbharadwaj 11y ago
In fact, OCaml modules do correspond to Haskell type class instances, and there are ways to extend the ML module system to support ad-hoc style polymorphism (http://www.mpi-sws.org/~dreyer/papers/mtc/main-long.pdf http://www.mpi-sws.org/~dreyer/papers/mtc/main-long.pdf).
On the other hand, you can also use modules as a simple namespacing mechanism (as in Haskell modules). But this does not capture the full power of the module system.