Odoc_info.ModuleRepresentation and manipulation of modules and module types.
type module_element = Odoc_module.module_element = | Element_module of t_module| Element_module_type of t_module_type| Element_included_module of included_module| Element_class of Class.t_class| Element_class_type of Class.t_class_type| Element_value of Value.t_value| Element_type_extension of Extension.t_type_extension| Element_exception of Exception.t_exception| Element_type of Type.t_type| Element_module_comment of textTo keep the order of elements in a module.
Used where we can reference t_module or t_module_type.
and module_parameter = Odoc_module.module_parameter = {mp_name : string;the name
*)mp_type : Types.module_type option;the type
*)mp_type_code : string;the original code
*)mp_kind : module_type_kind;the way the parameter was built
*)}and module_kind = Odoc_module.module_kind = | Module_struct of module_element listA complete module structure.
*)| Module_alias of module_aliasComplete name and corresponding module if we found it
*)| Module_functor of module_parameter * module_kindA functor, with its parameter and the rest of its definition
*)| Module_apply of module_kind * module_kindA module defined by application of a functor.
*)| Module_apply_unit of module_kindA generative application of a functor.
*)| Module_with of module_type_kind * stringA module whose type is a with ... constraint. Should appear in interface files only.
*)| Module_constraint of module_kind * module_type_kindA module constraint by a module type.
*)| Module_typeof of stringby now only the code of the module expression
*)| Module_unpack of string * module_type_aliascode of the expression and module type alias
*)Different kinds of a module.
and t_module = Odoc_module.t_module = {m_name : Name.t;Complete name of the module.
*)mutable m_type : Types.module_type;The type of the module.
*)mutable m_info : info option;Information found in the optional associated comment.
*)m_is_interface : bool;true for modules read from interface files
m_file : string;The file the module is defined in.
*)mutable m_kind : module_kind;The way the module is defined.
*)mutable m_loc : location;mutable m_top_deps : Name.t list;The toplevels module names this module depends on.
*)mutable m_code : string option;The whole code of the module
*)mutable m_code_intf : string option;The whole code of the interface of the module
*)m_text_only : bool;true if the module comes from a text file
}Representation of a module.
and module_type_alias = Odoc_module.module_type_alias = {mta_name : Name.t;Complete name of the target module type.
*)mutable mta_module : t_module_type option;The real module type if we could associate it.
*)}and module_type_kind = Odoc_module.module_type_kind = | Module_type_struct of module_element listA complete module signature.
*)| Module_type_functor of module_parameter * module_type_kindA functor, with its parameter and the rest of its definition
*)| Module_type_alias of module_type_aliasComplete alias name and corresponding module type if we found it.
*)| Module_type_with of module_type_kind * stringThe module type kind and the code of the with constraint.
*)| Module_type_typeof of stringby now only the code of the module expression
*)Different kinds of module type.
and t_module_type = Odoc_module.t_module_type = {mt_name : Name.t;Complete name of the module type.
*)mutable mt_info : info option;Information found in the optional associated comment.
*)mutable mt_type : Types.module_type option;None means that the module type is abstract.
mt_is_interface : bool;true for modules read from interface files.
mt_file : string;The file the module type is defined in.
*)mutable mt_kind : module_type_kind option;The way the module is defined. None means that module type is abstract. It is always None when the module type was extracted from the implementation file. That means module types are only analysed in interface files.
mutable mt_loc : location;}Representation of a module type.
val module_elements : ?trans:bool -> t_module -> module_element listAccess to the elements of a module.
val module_module_types : ?trans:bool -> t_module -> t_module_type listAccess to the module types of a module.
val module_included_modules : ?trans:bool -> t_module -> included_module listAccess to the included modules of a module.
val module_type_extensions :
?trans:bool ->
t_module ->
Extension.t_type_extension listAccess to the type extensions of a module.
val module_exceptions : ?trans:bool -> t_module -> Exception.t_exception listAccess to the exceptions of a module.
val module_types : ?trans:bool -> t_module -> Type.t_type listAccess to the types of a module.
val module_values : ?trans:bool -> t_module -> Value.t_value listAccess to the values of a module.
val module_functions : ?trans:bool -> t_module -> Value.t_value listAccess to functional values of a module.
val module_simple_values : ?trans:bool -> t_module -> Value.t_value listAccess to non-functional values of a module.
val module_classes : ?trans:bool -> t_module -> Class.t_class listAccess to the classes of a module.
val module_class_types : ?trans:bool -> t_module -> Class.t_class_type listAccess to the class types of a module.
val module_all_classes : ?trans:bool -> t_module -> Class.t_class listThe list of classes defined in this module and all its submodules and functors.
val module_is_functor : t_module -> booltrue if the module is functor.
val module_parameters :
?trans:bool ->
t_module ->
(module_parameter * text option) listThe list of couples (module parameter, optional description).
val module_type_elements : ?trans:bool -> t_module_type -> module_element listAccess to the elements of a module type.
val module_type_modules : ?trans:bool -> t_module_type -> t_module listAccess to the submodules of a module type.
val module_type_module_types :
?trans:bool ->
t_module_type ->
t_module_type listAccess to the module types of a module type.
val module_type_included_modules :
?trans:bool ->
t_module_type ->
included_module listAccess to the included modules of a module type.
val module_type_exceptions :
?trans:bool ->
t_module_type ->
Exception.t_exception listAccess to the exceptions of a module type.
val module_type_types : ?trans:bool -> t_module_type -> Type.t_type listAccess to the types of a module type.
val module_type_values : ?trans:bool -> t_module_type -> Value.t_value listAccess to the values of a module type.
val module_type_functions : ?trans:bool -> t_module_type -> Value.t_value listAccess to functional values of a module type.
val module_type_simple_values :
?trans:bool ->
t_module_type ->
Value.t_value listAccess to non-functional values of a module type.
val module_type_classes : ?trans:bool -> t_module_type -> Class.t_class listAccess to the classes of a module type.
val module_type_class_types :
?trans:bool ->
t_module_type ->
Class.t_class_type listAccess to the class types of a module type.
val module_type_all_classes :
?trans:bool ->
t_module_type ->
Class.t_class listThe list of classes defined in this module type and all its submodules and functors.
val module_type_is_functor : t_module_type -> booltrue if the module type is functor.
val module_type_parameters :
?trans:bool ->
t_module_type ->
(module_parameter * text option) listThe list of couples (module parameter, optional description).
val module_type_comments : ?trans:bool -> t_module_type -> text listThe list of module comments.