# loki.types.module_type module

Representation of a module type for module definitions.

class ModuleType(name=None, module=None)

  Bases: `DataType`

  Representation of a module definition.

  This serves as a caching mechanism for module definitions in symbol tables.

  Parameters:

    - name (str, optional) – The name of the module. Can be skipped if `module` is provided.

    - module (`Module`, optional) – The procedure this type represents

  property name

    The name of the module

    This looks up the name in the linked `module` if available, otherwise returns the name stored during instantiation of the `ModuleType` object.

  property module

    The `Module` object represented by this type

    If not provided during instantiation or if the underlying `weakref` is dead, this returns `BasicType.DEFERRED`.