The recent OCaml 3.12 introduces a feature of first-class packaged modules:
First-class packages modules.
- New kind of type expression, for packaged modules:
(module PT)
- New kind of expression, to pack a module as a first-class value:
(module MODEXPR : PT)
.- New kind of module expression, to unpack a first-class value as a module:
(val EXPR : PT)
.- PT is a package type of the form
S
orS with type t1 = ... and ... and type tn = ...
(S
refers to a module type).
Where can I find motivating examples or papers using this feature?