Comment

Comment by namanbharadwaj

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).

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.

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton