Let's look at the syntax and semantics of modules.
module ModuleName = struct
definitions
end
Module definitions must be capitalized. Idiomatically, module names are written in CamelCase, rather than snake_case. Definitions can be anything we've seen:
let, type, expressionsmodule;;, but it isn't idiomatic to do so.To evaluate a structure, just evaluate each definition in order from the top to the bottom. The result is a module value (or simply module).
Module values are not like other values. They cannot be bound to a name with let, and they cannot be passed to functions or returned.