OCaml 4.14 and 5.0: Interoperability of module type of with local module expressions
0 reputation · 20 Jan 2020, 15:09 UTC
Goal: Assess whether the OCaml 5.0 behavior of module type of that excludes locally defined modules should be treated as the permanent semantics or left open for future revision, given the intentional change from OCaml 4.14 where such locals were included in the resulting signature.
Constraints: The change lacks a formal deprecation notice or migration path, so code that relied on the 4.14 semantics may fail to compile in 5.0 without modification, and there is no official guidance on how to adapt libraries that expose internal module types. The unresolved decision affects library authors and users who depend on inline modules for type abstraction.
Questions: Should future OCaml releases retain the 5.0 exclusion of local modules from module type of as the definitive rule, restore the 4.14 inclusion, or provide a compatibility mode or warning to ease migration?