New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unused variable catches more than one case is printed multiple times for unused variables that do not catch multiple cases #14207
Comments
Yes, this is due to several possible |
Thanks! Though I don't think that PR fully fixes this issue; the variable |
Ah I see, the PR only fixes the repetition. About a more precise detection, this is more complicated, as the dependency is in an existential variable... |
It's not the dependency I'm complaining about (I think the computation there is correct), but the claim that it matches multiple cases. When I default =
fix default (t : B.type base_type) : @interp base_type base_interp t :=
match t as t0 return (@interp base_type base_interp t0) with
| base x => @admit (@interp base_type base_interp (@base base_type x))
| arrow s d =>
fun
_ : (fix interp (base_type : Type) (base_interp : forall _ : base_type, Type) (t0 : B.type base_type) {struct t0} : Type :=
match t0 return Type with
| base t1 => base_interp t1
| arrow s0 d0 => forall _ : interp base_type base_interp s0, interp base_type base_interp d0
end) base_type base_interp s => default d
end
: forall t : B.type base_type, @interp base_type base_interp t
Arguments default {t} I thought that maybe it's complaining about Fixpoint default {t} : interp base_interp t
:= match t with
| base x => admit
| arrow s d => fun _ : interp _ _ => @default d
end.
Set Printing All.
Print default. gives default =
fix default (t : B.type base_type) : @interp base_type base_interp t :=
match t as t0 return (@interp base_type base_interp t0) with
| base x => @admit (@interp base_type base_interp (@base base_type x))
| arrow s d => fun _ : @interp base_type base_interp s => default d
end
: forall t : B.type base_type, @interp base_type base_interp t
Arguments default {t} If I annotate the |
Sorry for being slow in understanding. The wrong reporting is also due to side effects (there is a backtracking inside the algorithm which is counting I updated #14261 so that it does not use a side effect. |
Awesome, thanks! |
Description of the problem
What's up with this? cc @herbelin
I assume it has something to do with trying to elaborate the
match
in multiple ways, since addingreturn interp _ t
suppresses the error message?Coq Version
master (bba5713)
The text was updated successfully, but these errors were encountered: