Documentation

Mathlib.Tactic.Linter.InternalConstructor

Linting against internal constructors #

Sometimes, we want a constructor to be public for definitional equality reasons, but to discourage access by the user. However, even internal names (e.g. _mkInternal) can be used without error via anonymous constructor notation ⟨...⟩. This linter assumes internal constructors are internal for a reason, and lints against using them.

Future work #

Forbid internal constructors (e.g. _mkInternal) from being referenced during elaboration. By default, this is true, and disallows references arising from notation as well (including e.g. anonymous constructor notation).

Internal constructors may be used freely in the module in which they were defined.

Lints against using constructors with internal names during elaboration.

Equations
  • One or more equations did not get rendered due to their size.
Instances For