Open JasonGross opened 10 years ago
Oops, I forgot the forall instance that made it compile in HoTT/coq, which I've now put back. This might be a "the unification engine changed, it's not getting fixed" bug. The newlines should be added in either case, though.
Indeed the error is missing newlines, but the test file should rather be the following don't you think? Otherwise point A somewhat weird.
Set Universe Polymorphism. Class IsPointed (A : Type) := ispoint : A.
Definition point (A : Type) `{IsPointed A} := ispoint.
Generalizable Variables A B f.
Instance ispointed_forall `{H : forall a : A, IsPointed (B a)} : IsPointed (forall a, B a) := fun a => @point (B a) (H a).
Instance ispointedsigma {pa:IsPointed A}
{IsPointed (B (point A))}
: IsPointed (sigT B) := .
If you're talking about the fact that point A
meant @point _ _ A
, yes, that's weird. Does the revised test case trigger the error in the old code, though? I'd rather keep the test-case as-is, maybe with a comment about it being confusingly named, unless you're sure the change reproduces the buggy behavior on unfixed code.
Yes, that's what I mean. The revised test-case does not trigger the error in any version I have, could you check? I'm quite surprised it managed to do typeclass resolution there. It might very well be that unification made arbitrary choices before that it doesn't do anymore.
Current trunk (90d64647d3fd5dbf5c337944dc0038f0b19b8a51) gives the error on the original code. Older versions of Coq inferred that I was asking for a point of the type (forall x : Type, (fun _ : Type => A) x)
. Perhaps this is okay and not an error, though, and it's just that typeclass error messages leave a lot to be desired in terms of brevity.
Works in HoTT/coq, but not trunk-polyproj. Also, you're missing newlines before
CONSTRAINTS
, andUNIVERSES
.