Modular implicits
Leo White, Fr\'ed\'eric Bour, Jeremy Yallop

TL;DR
Modular implicits extend OCaml with type-directed implicit module parameters, enabling ad-hoc polymorphism similar to Scala implicits and modular type classes, supporting features like inheritance and associated types.
Contribution
This paper introduces modular implicits, a novel extension to OCaml that simplifies ad-hoc polymorphism using type-directed implicit modules based on OCaml's first-class functors.
Findings
Supports systematic ad-hoc overloading features
Naturally integrates with OCaml's module system
Enables inheritance and associated types
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
