module_def Production

Definition

module_def : module identifier sig_list { decl_body }

Purpose

A module_def defines a module. The module's name is identifier, and it implements all signatures in sig_list. The body of the module is given by decl_body.

Semantics

The module must implement all elements in all of the signatures given in sig_list. Any additional elements may produce a warning.

No two signatures in sig_list may contain the a declaration of the same name unless both declarations have the shared specifier.

Exactly one module_def may coexist with exactly one uninitialized module_decl of the same name, which states implementation of an equivalent or subset of the signatures in sig_list.