Add support Scala 3 for module derivation
Add support Scala 3 for module derivation
But i couldn't migrate to Scala 3
-
class InitDerivation - And this:
Code
import derevo.{DerivationK2, DerivationKN11}
import tofu.higherKind.bi.{EmbedBK, RepresentableB}
import tofu.higherKind.{Embed, RepresentableK}
object representableK extends DerivationK2[RepresentableK] {
def instance[T[_[_]]]: RepresentableK[T] = macro HigherKindedMacros.representableK[T]
}
object embed extends DerivationK2[Embed] {
def instance[T[_[_]]]: Embed[T] = macro HigherKindedMacros.embed[T]
}
object representableB extends DerivationKN11[RepresentableB] {
def instance[T[bf[_, _]]]: RepresentableB[T] = macro HigherKindedMacros.representableB[T]
}
object biembed extends DerivationKN11[EmbedBK] {
def instance[T[fb[_, _]]]: EmbedBK[T] = macro HigherKindedMacros.embedB[T]
}
If you could tell me how this could be done, I would be grateful
@Roman-Statsura Currently, there is no scala3 impl for HigherKindedMacros . In migrated modules we just do not migrate such parts on scala3.
It's hard tro say if this mofdule makes but it feel like this module doesn't make a lot of sence without this macro. So we need to wait for implementation of HigherKindedMacros
What about class InitDerivation - you can take a look at modules/logging/derivation/src/main/scala-2/tofu/logging/derivation/LoggingDerivationImpl.scala and modules/logging/derivation/src/main/scala-3/tofu/logging/derivation/LoggingDerivationImpl.scala