Skip to content
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

Problems with multi-arg lambdas #32

Closed
benmos opened this issue Jun 5, 2012 · 2 comments
Closed

Problems with multi-arg lambdas #32

benmos opened this issue Jun 5, 2012 · 2 comments

Comments

@benmos
Copy link

benmos commented Jun 5, 2012

With HEAD as of this morning, I get the following error when trying to use a multi-arg lambda at the REPL:

*test> (\x, y => x + y) 3 2
(input):1:INTERNAL ERROR: "Nothing to introduce"
This is probably a bug, or a missing error message.
Please consider reporting at https://github.com/edwinb/Idris-dev/issues

*test> (\x, y => x `plus` y) 3 2
(input):1:INTERNAL ERROR: "Nothing to introduce"
This is probably a bug, or a missing error message.
Please consider reporting at https://github.com/edwinb/Idris-dev/issues
@edwinb
Copy link
Contributor

edwinb commented Oct 18, 2012

Hmm, this one is old, I'm surprised I didn't comment because it's at least easy to explain, if not to fix... Lambdas only work if they have a type, so type directed elaboration doesn't work here. It's okay if you give it a type, but I realise it's a bit awkward:

let f : (Nat -> Nat -> Nat) = (\x, y => x + y) in f 3 2

@edwinb edwinb mentioned this issue Nov 26, 2012
@edwinb
Copy link
Contributor

edwinb commented Jul 28, 2013

This appears to have been fixed a while ago (probably while fixing a different issue).

@edwinb edwinb closed this as completed Jul 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants