You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ltac inhabited_value, in floyd/deadvars.v, does not work well.
The failure message doesn't work, because Ltac does not allow mixing of failure messages with returning constr results, in some cases. The behavior is that instead of the failure message, we get Expression does not evaluate to a tactic (got a constr).
This can be fixed by replacing
let t := eval unfold T in T in
tryif constr_eq t T
then fail 3 "cannot prove that type" T "is inhabited... "
else inhabited_value t
with simply fail 3 "cannot prove.." , but then the extra functionality of unfolding definitions is lost. It's probably worth making the change, though, because otherwise the error message from deadvars is inscrutable.
The tactic really should look up type T to see whether there is anything of type Inhabitant T in the typeclass_instances database, but I don't know how to do that in Ltac. Perhaps it's possible in Ltac2 ?
The text was updated successfully, but these errors were encountered:
Ltac inhabited_value, in floyd/deadvars.v, does not work well.
Expression does not evaluate to a tactic (got a constr).
This can be fixed by replacing
with simply
fail 3 "cannot prove.."
, but then the extra functionality of unfolding definitions is lost. It's probably worth making the change, though, because otherwise the error message fromdeadvars
is inscrutable.Inhabitant T
in thetypeclass_instances
database, but I don't know how to do that in Ltac. Perhaps it's possible in Ltac2 ?The text was updated successfully, but these errors were encountered: