Skip to content
Snippets Groups Projects
Commit 4cfa2e8a authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Remove workaround.

This bug is strange:

- In order to type check the argument `I : gmap lft lft_names`, Coq needs an
  instance `Countable lft`. Since `finite.finite_countable` has been declared
  using `Hint Immediate` it will try that instance first (*), which means it
  has to find an instance `Finite lft`.
- Apparently, at this moment the type of the argument `A` has not been inferred
  by the type checker yet. So, there is a hypothesis `A : ?T`.
- In order to prove `Finite lft`, Coq unifies `?T` with `Finite lft` and uses
  the hypothesis `A`.
- Subsequent type checking fails, because `gmap lft lft_names` is type checked
  using a wrong/arbitrary instance `Countable lft`.

This is probably a Coq bug: type class search should not just unify with
hypotheses whose type is just an evar.

(*) `finite.finite_countable` has been declared using `Hint Immediate` to make
sure it is only used at leafs, not to make sure that it is used first.
parent cc1b8ab0
Branches
No related tags found
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment