2015
DOI: 10.4204/eptcs.198.2
|View full text |Cite
|
Sign up to set email alerts
|

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 ty… Show more

Help me understand this report
View preprint versions

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
23
0

Year Published

2016
2016
2021
2021

Publication Types

Select...
5
2

Relationship

1
6

Authors

Journals

citations
Cited by 24 publications
(23 citation statements)
references
References 14 publications
0
23
0
Order By: Relevance
“…In OCaml the waters are muddied by side-effects and nontermination. contexts, which are passed as implicit arguments [20]. (Lifts through contravariant contexts are defined below in terms of the minimal interface.)…”
Section: Subtypesà La Curry and Howardmentioning
confidence: 99%
See 2 more Smart Citations
“…In OCaml the waters are muddied by side-effects and nontermination. contexts, which are passed as implicit arguments [20]. (Lifts through contravariant contexts are defined below in terms of the minimal interface.)…”
Section: Subtypesà La Curry and Howardmentioning
confidence: 99%
“…This corresponds to the Church encoding of the natural numbers [8], in which a natural number is anything that can produce a M.t from M.zero : M.t and M.suc : M.t → M.t. Here and elsewhere we're using the modular implicits extension to OCaml [20] -not for implicit instantiation of arguments, but because modular implicits support higher-kinded quantification with propagation of variance information. Other approaches to higher-kinded polymorphism could perhaps be used instead [22].…”
Section: First-class Subtypes As An Inductive Typementioning
confidence: 99%
See 1 more Smart Citation
“…It is theoretically possible to infer the type witness since there is a one to one correspondence between the witnesses and types. The work on modular implicits [39] promises to offer this functionality.…”
Section: A Motivating Examplementioning
confidence: 99%
“…The spine view is implicit much like in the Haskell implementation. The Haskell Typeable and Data type classes are directly translated as a modules, using the correspondence explained in [39].…”
Section: Generic Libraries and Extensions In MLmentioning
confidence: 99%