-
Notifications
You must be signed in to change notification settings - Fork 75
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
not found: value λ #144
Comments
Do you have a branch where I could try to reproduce the problem? |
Yep. Here is the branch https://github.com/steinybot/scala-hedgehog/tree/future-result. Here is the failed build https://travis-ci.com/github/steinybot/scala-hedgehog/jobs/313853593. |
Thanks, I'll check it out. |
@steinybot OK, the problem wasn't that kind-projector was triggered, but because there are some type errors underneath that produced a misleading error message. After applying these changes to commit steinybot/scala-hedgehog@5933a2b: diff --git a/test/src/test/scala/hedgehog/core/TreeTest.scala b/test/src/test/scala/hedgehog/core/TreeTest.scala
index ba95937..c0af20b 100644
--- a/test/src/test/scala/hedgehog/core/TreeTest.scala
+++ b/test/src/test/scala/hedgehog/core/TreeTest.scala
@@ -5,7 +5,7 @@ import hedgehog.runner._
object TreeTest extends Properties {
- private val ToProperty = λ[PF1[Tree, PropertyT]](treeProperty)
+ private val ToProperty = λ[PF1[Tree, PropertyT]](t => treeProperty(t))
override def tests: List[Test] =
List(
diff --git a/test/src/test/scala/hedgehog/predef/EitherTest.scala b/test/src/test/scala/hedgehog/predef/EitherTest.scala
index 455220a..46d9355 100644
--- a/test/src/test/scala/hedgehog/predef/EitherTest.scala
+++ b/test/src/test/scala/hedgehog/predef/EitherTest.scala
@@ -7,7 +7,7 @@ import hedgehog.runner._
object EitherTest extends Properties {
- private val ToProperty = λ[PF1[Either[Nothing, *], PropertyT]](eitherProperty)
+ private val ToProperty = λ[PF1[Either[Nothing, *], PropertyT]](e => eitherProperty(e))
override def tests: List[Test] =
List(
Then I get the following errors:
I'm unsure how to proceed from there since I'm not familiar with hedgehog, but I hope that's sufficient for you to debug the problem further. The other occurrences of |
Ahh awesome. Thank you very much @larsrh for taking the time to look into this! Surprising that the eta-expansion isn't working as expected and that the end result is an error about not being able to find I made the same changes as you, explicitly using a function literal, and I didn't have any compilation errors. |
Great to hear! Can we close this issue, then? |
Well my particular problem is solved but the error is still confusing. If there is no way to improve it then yeah sure, just close this. |
Good point. I'll leave it open. |
Coming late to this, I think the issue here is that Kind-Projector triggers based on the shape of the trees it works with. It's possible that this code had an unsupported shape. When I get a chance I'll try to create a test case that reliably triggers the issue on valid code. |
Any idea why I can use
*
but notλ
?Someone else has the same problem on StackOverflow https://stackoverflow.com/questions/48767385/kind-compiler-plugin-%CE%BB-not-found
The text was updated successfully, but these errors were encountered: