typelevel / simulacrum

First class syntax support for type classes in Scala
BSD 3-Clause "New" or "Revised" License
935 stars 61 forks source link

Update scala versions #226

Open sh0hei opened 3 years ago

tsuyoshizawa commented 3 years ago

In our project, we also encountered the following compilation error in Scala 2.13.7. https://github.com/typelevel/simulacrum/runs/4148642944?check_suite_focus=true#step:7:322

[error] /home/runner/work/simulacrum/simulacrum/examples/src/test/scala/simulacrum/examples/examples.scala:124:6: Cannot find a wildcard type in supposed n-arity type constructor
[error]     @typeclass trait Bifunctor[F[_, _]] {
ashkann commented 2 years ago

I'm having the same problem:

@typeclass
trait Auth[F[_]] {
  def auth(req: Request[F]): OptionT[F, User]
}

object Auth {
  def fromCookie[F[_] :Monad :Sessions :Users]: Auth[F] =
    req => Sessions[F].read(req).fold(OptionT.none[F, User])(Users[F].findLoggedIn)
}
[error] /Users/ashkan/Hobby/Shahname/jvm/src/main/scala/ir/ashkan/shahnameh/Auth.scala:9:2: Cannot find a wildcard type in supposed n-arity type constructor
[error] @typeclass
alexarchambault commented 2 years ago

I'm having the same problem in coursier here (https://github.com/coursier/coursier/pull/2327).

AmerPandzo commented 2 years ago

Same issue with Scala 2.13.8

\src\main\scala\autocopy\helpers.scala:17:4: Cannot find a wildcard type in supposed n-arity type constructor
[error]   @typeclass trait Empty[F[_]] {
danslapman commented 2 months ago

For those who encoutered this error - I created a fork (& published) in which simulacrum is updated to work with recent 2.12 & 2.13 compiler versions: https://github.com/leviysoft/simulacrum