milessabin / export-hook

Minimal infrastructure for type class providers to support the inclusion of derived, subclass and other orphan instances in their implicit scope.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unsupported Kind

wheaties opened this issue · comments

Using 1.10 with 2.11.7, combining a higher-kinded type with a regular type gives the following issue with @exports:

import export._

trait Food[F[_], A]

object Food extends LowPriorityFood

@imports[Food]
trait LowPriorityFood

trait BarFood[M[_], A] extends Food[M, A]

@exports(Subclass)
object BarFood{

    @export(Subclass)
    implicit def bar[M[_]] = new BarFood[M, Int]{}
}
[error] /Users/oreese/Workspace/playground/lala.scala:9: Food has an unsupported kind
[error] @imports[Food]
[error]  ^
[error] /Users/oreese/Workspace/playground/lala.scala:14: BarFood has an unsupported kind
[error] @exports(Subclass)
[error]  ^
[error] two errors found

Due note, you remove the regular type and it compiles just fine.

Should be fixed by #20 and #21.