ocamllabs/ocaml-modular-implicits — pull request #28 by def-lkb (2014-12-12 11:19:07+00:00)
Title: Add implicit statement

This patch is incomplete, I just open the pull request to start discussions.
It introduces a new item, in signature and structures:
```ocaml
implicit Some.Module
implicit Some.Functor(_)
```
such that:
```ocaml
implicit module X = EXPR
implicit functor F (A : T) = EXPR
```
is equivalent to:
```ocaml
module X = EXPR
implicit X

module F (A : T) = EXPR
implicit F(_)
```

This way it is possible to manage implicits outside of the defining module, and to bind external modules as implicits (e.g `implicit Core.Std.Option`).

TODO:
- discuss interaction with module inclusion relation
- rewrite "implicit module X = …" into "module X = … implicit X" directly in the parser? (how would pretty-printing behave? directly matching `Tsig_module X :: Tsig_implicit X' :: _` to recover sugared form?
Also, the parser structure_item and signature_item are expected to produce a single item, though it's not a problem to lift this to a list
- add similar construction in let-bindings (`let implicit X in …`)
- complete and test the implementation