This chapter describes language extensions and convenience features that are implemented in OCaml, but not described in the OCaml reference manual.
(Introduced in OCaml 4.04)
|
For patterns, local opens are limited to the module-path.( pattern) construction. This construction locally open the module referred to by the module path module-path in the scope of the pattern pattern.
When the body of a local open pattern is delimited by [ ], [| |], or { }, the parentheses can be omitted. For example, module-path.[ pattern] is equivalent to module-path.([ pattern]), and module-path.[| pattern |] is equivalent to module-path.([| pattern |]).