Is there any reason that `@extension` here does no...
# arrow
j
Is there any reason that
@extension
here does not work?
Copy code
@higherkind
class Test<A>(val f: () -> A): TestOf<A> {
    companion object {}
}

@extension
interface TestFunctor : Functor<ForTest> {
    override fun <A, B> Kind<ForTest, A>.map(f: (A) -> B): Kind<ForTest, B> =
        Test { f(fix().f()) }
}
This fails with
kaptKotlin
reporting `e: error: Arrow's annotations can only be used on Kotlin classes. Not valid for error.NonExistentClass``But aren't pretty much all instance declared this way? What am I missing here?
Solved itself for some weird reason. I don't really get what was going on there...
r
They can't be placed together in the same module.
A limitation of arrow Meta at the moment
j
Bit confusing that it actually worked for a while o.O Anyway I'll work around it by providing the ext methods myself (it's only 3 atm). But good to know, thanks 🙂
r
If you keep running into issues you may just get rid of @higherkind all together and add the boilerplate manually since it isn't that much anyway.
j
Ah ok. I think I misunderstood the first response :) that is indeed the better solution here, thanks again 😅
👍 1