-
Notifications
You must be signed in to change notification settings - Fork 444
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
(kernel) unknown constant in mutually recursive definition #2628
Comments
Smaller reproducer:
The recursive call seems to be missing an argument. Maybe |
but I am not sure I follow: Why should it be bad if a call has more arguments? As #2892 shows that can be perfectly fine if the result type happens to be a function type. Will dive a bit deeper here, and cook up a few test cases. NB: |
The `packMutual` code ought to reliably replace all recursive calls to the functions in `preDefs`, even when they are under- or over-applied. Therefore eta-expand if need rsp. keep extra arguments around. Needs a tweak to `Meta.transform` to avoid mistaking the `f` in `f x1 x2` as a zero-arity application. Includes a test case. This fixes #2628 and #2883.
The `packMutual` code ought to reliably replace all recursive calls to the functions in `preDefs`, even when they are under- or over-applied. Therefore eta-expand if need rsp. keep extra arguments around. Needs a tweak to `Meta.transform` to avoid mistaking the `f` in `f x1 x2` as a zero-arity application. Includes a test case. This fixes #2628 and #2883.
The `packMutual` code ought to reliably replace all recursive calls to the functions in `preDefs`, even when they are under- or over-applied. Therefore eta-expand if need rsp. keep extra arguments around. Needs a tweak to `Meta.transform` to avoid mistaking the `f` in `f x1 x2` as a zero-arity application. Includes a test case. This fixes #2628 and #2883.
Description
In some (possibly not-well-founded) mutually recursive definitions, we get
(kernel) unknown constant
.Context
I stumbled over this while trying to help someone on Zulip.
Steps to Reproduce
MWE:
This prints
The kernel error goes away if I use
aboutObjects o
in the call torw
, i.e. with an explicit argument.Expected behavior: No kernel errors.
Actual behavior: The kernel prints an error
Versions
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: