
Modular implicits – a system for ad-hoc polymorphism in OCaml [pdf] - bshanks
http://eptcs.web.cse.unsw.edu.au/paper.cgi?ML2014.2.pdf
======
Apanatshka
Summary of the idea:

Add implicit arguments with some extra syntax. Whenever the argument is
unambiguous, you can just not mention it, whenever it's ambiguous you add the
argument to a function call. Modules provide the structs of related functions,
so implicit module typed arguments are a good fit for "typeclass-like"
functionality. The paper also mentions some nice extensions of importing
implicits inside other modules.

If you know implicit arguments from Scala or Agda [0] or whatever other
language, you get the mechanism.

If you know type classes from Haskell, you know the "goal" and the
capabilities. Only this proposal requires less extension of the language,
because you can disambiguate instances by supplying one by hand (basically
implicits applied to "the scrap your typeclasses" approach [1]).

[0]:
[http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Docs.Implic...](http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Docs.ImplicitArguments)

[1]: [http://www.haskellforall.com/2012/05/scrap-your-type-
classes...](http://www.haskellforall.com/2012/05/scrap-your-type-classes.html)

