-
Notifications
You must be signed in to change notification settings - Fork 56
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
linear lambda claims to consume unrelated binder #364
Comments
No, actually, something else is going on here after all. So this could just be my lack of understanding about linearity. Could anyone comment?
Gives me Additionally my editor gives me another error there that I'm not sure how to get idris2 to give me: |
foo4 : (1 f : (1 x : Nat) -> Maybe Char) -> Maybe Char
foo4 f = Just (S Z) >>= (\arr => ?rhs arr) The above variation on foo3 says that |
You can't use There's still some glitches in the calculation of quantities in holes under case blocks, which is an unrelated thing, but still needs to be fixed. |
I see so the |
yes, that error message isn't very good, but it'll take a bit more work to come up with a clearer one I think - since it depends a bit on the surrounding context. So to report something more usefully, it needs to know that you're inside an argument that's unrestricted. |
Idris 2, version 0.1.0-b617cae88
Steps to Reproduce
Examine hole foo1_rhs and foo2_rhs
Expected Behavior
Both holes should have
1 f : (1 x : a) -> b
andfoo2_rhs
should additionally have1 arr : Char
Observed Behavior
foo2_rhs
has1 arr : Char
but also has0 f : (1 x : a) -> b
f
is shown as having been consumed, which is incorrect as I understand it.But further, this is not actually the case, as:
will give a correct error of
There are 0 uses of linear name f
. Meaning thatf
isn't really consumed but just being wrongly reported.The text was updated successfully, but these errors were encountered: