typelevel / typelevel/kind-projector

not found: value λ

Open
#144 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
Scala
Stars
923
Forks
75
Avg merge
6h 5m
Merged PRs (30d)
1

Description

Any idea why I can use * but not λ?

sbt:hedgehog> show Test/libraryDependencies
[info] test / Test / libraryDependencies
[info] 	List(org.scala-lang:scala-library:2.12.11, org.typelevel:kind-projector:0.11.0:plugin->default(compile))
[info] runner / Test / libraryDependencies
[info] 	List(org.scala-lang:scala-library:2.12.11, org.typelevel:kind-projector:0.11.0:plugin->default(compile))
[info] example / Test / libraryDependencies
[info] 	List(org.scala-lang:scala-library:2.12.11, org.typelevel:kind-projector:0.11.0:plugin->default(compile))
[info] sbt-test / Test / libraryDependencies
[info] 	List(org.scala-lang:scala-library:2.12.11, org.typelevel:kind-projector:0.11.0:plugin->default(compile), org.scala-sbt:test-interface:1.0)
[info] core / Test / libraryDependencies
[info] 	List(org.scala-lang:scala-library:2.12.11, org.typelevel:kind-projector:0.11.0:plugin->default(compile))
[info] Test / libraryDependencies
[info] 	List(org.scala-lang:scala-library:2.12.11, org.typelevel:kind-projector:0.11.0:plugin->default(compile))
sbt:hedgehog> Test/compile
[info] Compiling 18 Scala sources to /Users/jason/source/scala-hedgehog/test/target/scala-2.12/test-classes ...
[error] /Users/jason/source/scala-hedgehog/test/src/test/scala/hedgehog/core/TreeTest.scala:8:28: not found: value λ
[error]   private val ToProperty = λ[PF1[Tree, PropertyT]](treeProperty)
[error]                            ^
[error] /Users/jason/source/scala-hedgehog/test/src/test/scala/hedgehog/core/TreeTest.scala:8:52: missing argument list for method treeProperty in object TreeTest
[error] Unapplied methods are only converted to functions when a function type is expected.
[error] You can make this conversion explicit by writing `treeProperty _` or `treeProperty(_)` instead of `treeProperty`.
[error]   private val ToProperty = λ[PF1[Tree, PropertyT]](treeProperty)
[error]                                                    ^
[error] /Users/jason/source/scala-hedgehog/test/src/test/scala/hedgehog/core/TreeTest.scala:8:15: private val ToProperty in object TreeTest is never used
[error]   private val ToProperty = λ[PF1[Tree, PropertyT]](treeProperty)
[error]               ^
[error] /Users/jason/source/scala-hedgehog/test/src/test/scala/hedgehog/core/TreeTest.scala:15:15: private method treeProperty in object TreeTest is never used
[error]   private def treeProperty[A](tree: Tree[A]): PropertyT[A] =
[error]               ^
[error] /Users/jason/source/scala-hedgehog/test/src/test/scala/hedgehog/predef/EitherTest.scala:10:28: not found: value λ
[error]   private val ToProperty = λ[PF1[Either[Nothing, *], PropertyT]](eitherProperty)
[error]                            ^
[error] /Users/jason/source/scala-hedgehog/test/src/test/scala/hedgehog/predef/EitherTest.scala:10:66: missing argument list for method eitherProperty in object EitherTest
[error] Unapplied methods are only converted to functions when a function type is expected.
[error] You can make this conversion explicit by writing `eitherProperty _` or `eitherProperty(_)` instead of `eitherProperty`.
[error]   private val ToProperty = λ[PF1[Either[Nothing, *], PropertyT]](eitherProperty)
[error]                                                                  ^
[error] /Users/jason/source/scala-hedgehog/test/src/test/scala/hedgehog/predef/EitherTest.scala:5:30: Unused import
[error] import hedgehog.predef.Monad._
[error]                              ^
[error] /Users/jason/source/scala-hedgehog/test/src/test/scala/hedgehog/predef/EitherTest.scala:10:15: private val ToProperty in object EitherTest is never used
[error]   private val ToProperty = λ[PF1[Either[Nothing, *], PropertyT]](eitherProperty)
[error]               ^
[error] /Users/jason/source/scala-hedgehog/test/src/test/scala/hedgehog/predef/EitherTest.scala:17:15: private method eitherProperty in object EitherTest is never used
[error]   private def eitherProperty[A](either: Either[Nothing, A]): PropertyT[A] =
[error]               ^
[error] /Users/jason/source/scala-hedgehog/test/src/test/scala/hedgehog/predef/IdTest.scala:10:28: not found: value λ
[error]   private val ToProperty = λ[PF1[Id, PropertyT]](identityProperty)
[error]                            ^
[error] 21 errors found
[error] (test / Test / compileIncremental) Compilation failed
[error] Total time: 1 s, completed 4/04/2020, 9:54:15 am

Someone else has the same problem on StackOverflow https://stackoverflow.com/questions/48767385/kind-compiler-plugin-%CE%BB-not-found

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with sbt Test/compile, then inspect the λ usages in test/src/test/scala/hedgehog/core/TreeTest.scala, hedgehog/predef/EitherTest.scala, and hedgehog/predef/IdTest.scala. Compare the kind-projector configuration and imports used by these tests with the plugin setup shown in the dependency output. Done means the test sources compile successfully without the not-found errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.