coq-community / coq-ext-lib

A library of Coq definitions, theorems, and tactics. [maintainers=@gmalecha,@liyishuai]
https://coq-community.org/coq-ext-lib/
BSD 2-Clause "Simplified" License
129 stars 46 forks source link

`Set Typeclass Strict Resolution` #122

Open Lysxia opened 2 years ago

Lysxia commented 2 years ago

I recently discovered this wonderful option: Set Typeclass Strict Resolution, which would help avoid infinite loop problems such as that motivating https://github.com/coq-community/coq-ext-lib/pull/106.

When looking for unifications of a goal with an instance of this class, we “freeze” all the existentials appearing in the goals, meaning that they are considered rigid during unification and cannot be instantiated.

You have to add more type annotations sometimes but as far as I can tell the types are ambiguous in such situations anyway. @gmalecha do you have any experience with that option?