-
Notifications
You must be signed in to change notification settings - Fork 381
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
Cases and if statements in type signatures incorrectly take first branch #243
Comments
If I change foo : if False then Nat else Bool
foo = Z to FooTy : Type
FooTy = if False then Nat else Bool
foo : FooTy
foo = Z the definition of The same for |
I wonder if it's somehow related to #70. |
Coincidentally, I've just been fixing this one since it came up somewhere else... it's because they're at multiplicity zero and the case compiler thinks they're ignorable, which they're not. |
(It's not related to #70, by the way, just to answer that bit explicitly... that seems to be a different problem.) |
Add `intercalate` for `Data.List`
I'm running Idris2 0.2.0, and experiencing a problem where branches in type signatures sometimes seem to incorrectly reduce to the first branch:
Steps to Reproduce
(gist here)
Expected Behavior
I'd naively expect that branches in type signatures would act like branches elsewhere (reducing differently, based on their condition or match).
Observed Behavior
Case statements in type signatures seem to (often, though not always) reduce to their first branch. I also get "warning: unreachable branch" about the other branches, which makes sense if those branches can't be taken.
Weirdly, the following seems to correctly choose "Bool":
The text was updated successfully, but these errors were encountered: