Documentation

Lean.Linter.InternalModule

Enables the Lean core internalModule linter, which warns when a module considered "internal" declares a declaration that is not itself "internal".

The intent is that declarations living in internal modules (for example, anything under the Lean namespace, or the omega/grind implementation modules) stay internal, rather than becoming part of a project's public API by accident.

This linter is off by default and is not intended for use by non-core projects. It is a member of the linter.coreInternal set, so it can also be enabled via set_option linter.coreInternal true.

A module or declaration is internal if one of its name components is one of these strings.

Instances For

    Whether one of the components of n is in internalNameComponents.

    Instances For

      A module is internal if it is (a submodule of) one of these modules.

      Instances For

        Whether mod is an "internal" module, i.e. one whose declarations should stay internal.

        Instances For

          A declaration is internal if it lives in (a namespace under) one of these namespaces.

          Instances For

            Whether declName is an "internal" declaration.

            Instances For

              Enables the Lean core internalModule linter, which warns when a module considered "internal" declares a declaration that is not itself "internal".

              The intent is that declarations living in internal modules (for example, anything under the Lean namespace, or the omega/grind implementation modules) stay internal, rather than becoming part of a project's public API by accident.

              This linter is off by default and is not intended for use by non-core projects. It is a member of the linter.coreInternal set, so it can also be enabled via set_option linter.coreInternal true.

              Instances For