3 ms·
An alternative approach is under development [1] for OCaml : modular implicits [2]. This is a mix of ideas from SML/OCaml modules, Scala implicits and Haskell t
by dwenzek 11y ago
An alternative approach is under development [1] for OCaml : modular implicits [2].
This is a mix of ideas from SML/OCaml modules, Scala implicits and Haskell type classes.
More than one alternative module implementation may be provided for a module signature,
and the actual implementation to be used is chosen on the implicit modules available in the current context.
This results into an error if the implicit module cannot be chosen without ambiguity.
[1] https://github.com/ocamllabs/ocaml-modular-implicits https://github.com/ocamllabs/ocaml-modular-implicits
[2] http://www.lpw25.net/ml2014.pdf http://www.lpw25.net/ml2014.pdf
- Kutta 11y ago(very similar systems are already implemented in Agda and Coq)