-
Notifications
You must be signed in to change notification settings - Fork 37
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
Update Agda base to 2.7.0 #350
Conversation
There is a regression in issue #305: the instances from parametrized modules are no longer available in the instance table when we do the canonicity check. This seems to be caused by the new implementation of instance search in agda/agda#7109, specifically the optimization that deletes instances with explicit arguments from the signature before writing the interface file in https://github.com/agda/agda/blob/8b37dbf89978b46b360b2127d2d2aa9e60fe56ad/src/full/Agda/TypeChecking/InstanceArguments.hs#L1070-L1098 On the one hand, I understand that having instances that cannot possibly be used in other files is wasteful and thus it makes sense to remove them. On the other hand, I do not know of a good way for a backend like Perhaps the right solution would be to add some additional hooks to the backend machinery so that the backend can add additional checks during typechecking/elaboration itself. However, that's not something we cannot do without some major changes to Agda. |
I've been trying to fix this by rolling a manual canonicity check for instances so we don't have to rely on Agda's instance search being able to re-infer the instances during compilation. In theory, this should not be hard: an instance is canonical if it is either a top-level definition/constructor marked as However, agda/agda#7449 throws soot in the food (sorry for the Dutchism): the instance arguments that appear in the internal syntax are actually not the terms as constructed by instance search, but their whnf. For instances defined directly using copatterns, this does not matter. However, in the
For the first five items on this list, I could replace the current definitions in the |
ad1ec10
to
25224f2
Compare
Weird, the Nix build seems to fail:
I don't have Nix so I cannot reproduce it locally. Could anyone who uses Nix take a look? |
Thanks to some help from @liesnikov the Nix build has been fixed. We should investigate whether we can remove the jailbreak from |
Yes tbf at the time I put |
Closes #349