arXiv · 1512.01895
Modular implicits
Abstract
We present modular implicits, an extension to the OCaml language for ad-hoc polymorphism inspired by Scala implicits and modular type classes. Modular implicits are based on type-directed implicit module parameters, and elaborate straightforwardly into OCaml's first-class functors. Basing the design on OCaml's modules leads to a system that naturally supports many features from other languages with systematic ad-hoc overloading, including inheritance, instance constraints, constructor classes and associated types.
Explore related subjects
Keep this discovery
Leo White, Frédéric Bour, Jeremy Yallop. 2015-12-07. Modular implicits. https://doi.org/10.4204/eptcs.198.2
Cite the original work for its findings. Save a collection to share your selection of sources.