Modular implicits

Leo White
Frédéric Bour
Jeremy Yallop

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.

In Oleg Kiselyov and Jacques Garrigue: Proceedings ML Family/OCaml Users and Developers workshops (ML/OCaml 2014), Gothenburg, Sweden, September 4-5, 2014, Electronic Proceedings in Theoretical Computer Science 198, pp. 22–63.
Published: 5th December 2015.

ArXived at: https://dx.doi.org/10.4204/EPTCS.198.2 bibtex PDF
References in reconstructed bibtex, XML and HTML format (approximated).
Comments and questions to: eptcs@eptcs.org
For website issues: webmaster@eptcs.org