Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Idris eagerly selects incorrect concrete type when pattern matching #4865

Open
mb64 opened this issue May 27, 2020 · 0 comments
Open

Idris eagerly selects incorrect concrete type when pattern matching #4865

mb64 opened this issue May 27, 2020 · 0 comments

Comments

@mb64
Copy link

mb64 commented May 27, 2020

Steps to Reproduce

x : Num a => Maybe a
x = Just 1

y : Int
y with (x)
  | Just n = n
  | Nothing = 0

Expected/Observed Behavior

I expect this use of x to be inferred to have concrete type Maybe Int, but it is inferred to have concrete type Maybe Integer.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant