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
Anomaly when inferring simple typeclass instance. #13045
Comments
Ssreflect |
@CohenCyril Great to know about the |
I don't understand my trick 🤣 |
Anomaly probably from around Lines 204 to 209 in 1c919ed
|
Well spot. But this is about the "external anomaly". There is still the internal one (there are 2 anomalies in the error message) |
Actually the bad tclZERO looks like this one instead Lines 2147 to 2150 in 1c919ed
|
Similar anomaly, no ssr: From stdpp Require Import base gmap.
Goal Inhabited (gmap nat nat).
reflexivity. |
Much reduced version: #[universes(template)]
Inductive R (x:nat) (A:Type) : Type := C : A -> R x A.
#[universes(template)]
Inductive Box (A:Type) : Type := box : A -> Box A.
Goal Box (R 0 Set).
reflexivity. |
Fix coq#13045 Also make sure future anomalies won't be fed to tclzero. Instead of retyping with lax:true we may question why we produce an ill-typed term in decompose_app_rel: in the | App (f, [|arg|]) -> case we produce `fun x y : T => bla x y` but we have no assurance that the second argument of `bla` should have type `T`. (cherry picked from commit 9b27bd5)
Description of the problem
Strangely, swapping the two import lines makes the anomaly go away (though typeclass inference still fails to find the
empty_inhabited
instance.)Coq Version
8.12
The text was updated successfully, but these errors were encountered: