Linters about type classes #
This file defines several linters checking the correct usage of type classes and the appropriate definition of instances:
instance_priority
ensures that blanket instances have low priority.has_inhabited_instances
checks that every type has aninhabited
instance.impossible_instance
checks that there are no instances which can never apply.incorrect_type_class_argument
checks that only type classes are used in instance-implicit arguments.dangerous_instance
checks for instances that generate subproblems with metavariables.fails_quickly
checks that type class resolution finishes quickly.class_structure
checks that everyclass
is a structure, i.e.@[class] def
is forbidden.has_coe_variable
checks that there is no instance of typehas_coe α t
.inhabited_nonempty
checks whether[inhabited α]
arguments could be generalized to[nonempty α]
.decidable_classical
checks propositions for[decidable_... p]
hypotheses that are not used in the statement, and could thus be removed by usingclassical
in the proof.linter.has_coe_to_fun
checks whether necessaryhas_coe_to_fun
instances are declared.linter.check_reducibility
checks whether non-instances with a class as type are reducible.