Conversation
|
I still believe this would be a useful addition to the language, in particular to facilitate the job of ppx rewriters that need to inject components for local use only.
|
I agree that it's useful to be able to introduce unexported declarations. I don't like the approach of using attributes to change typing/scoping behaviour. Over on #682 you said:
I think the best option is to support |
Agreed. Well, I guess we should directly aim at supporting |
Yes! It would be much safer to declare the expected interface when opening a module. |
|
@alainfrisch: @yallop and I have written a paper about it (submitted to OCaml Workshop this year so if you come we can talk more on Friday). Implementation is also done and there is a playground. However, the code still needs some polish. |
|
Wow @objmagic nice job! Nice paper, and I love that the playground reflects it. |
This is a variant of #682, and also for discussion only.
This is about marking module declarations as private, so that they are visible in the rest of the current structure, but not exposed in the signature (in particular, there is a check that types declared in the private module can be eliminated). The syntax in the PR is currently:
Private let bindings from #682 can be encoded by picking a fresh name: