Previous Contents Next
6.10 Module types (module specifications)

Module types are the module-level equivalent of type expressions: they specify the general shape and type properties of modules.


module-type ::= modtype-path
  | sig { specification  [;;] } end
  | functor ( module-name :  module-type ) ->  module-type
  | module-type with  mod-constraint  { and mod-constraint }
  | ( module-type )
specification ::= val value-name :  typexpr
  | external value-name :  typexpr =  external-declaration
  | type-definition
  | exception constr-decl