Does `module%private` exist?


I just found out this syntax:

let%private myValue = 1;


Does such a syntax exist for the modules ?
For example:

module%private MyPrivateModule = {
   type t = string;
   let name = "joseph maarek";
   // ...

It would be very convenient for aliasing module without export it.

module%private Image = React_Component_Image;

// ...
<Image id=123 />


it exists in OCaml 4.08:

If and when BuckleScript upgrades to (or above) that version, it will automatically get it.

EDIT; on second thought, this is not actually what you asked for, sorry. I think it only works in interface files.


For ml file, you can use open struct ... end, the syntax in mli file is more restricted and amount essentially to private abbreviations.


I logged a ticket about this at the time:

tl;dr is it’s not planned in the short term, but might happen eventually.