PhBastiani
09/06/2019, 8:08 AMinline reified
in Arrow. For example, here :
inline fun <reified F> Free<ForAnkOps, ListK<File>>.run(interpreter: FunctionK<ForAnkOps, F>, MF: Monad<F>): Kind<F, ListK<File>> =
this.foldMap(interpreter, MF)
intuitively, this syntax is needed to typeclass instance look up. But how ?
I did not find this syntax described and used outside of Arrow.simon.vergauwen
09/06/2019, 8:35 AMPhBastiani
09/06/2019, 8:53 AMsimon.vergauwen
09/06/2019, 9:00 AMinline fun <reified F> Kind<F, A>.map(f: (A) -> B, FF: Functor<F> = functor()): Kind<F, B>
simon.vergauwen
09/06/2019, 9:01 AMsimon.vergauwen
09/06/2019, 9:02 AM@extensions
works today. We had a @typeclass
annotation which would generate the machinery for this trick to work.simon.vergauwen
09/06/2019, 9:03 AMApplicativeError<F, E>
and most of all it was error prone because it removes compile time guarantees. We attempted to make those guarantees using kapt as well but that turned out to be impossiblesimon.vergauwen
09/06/2019, 9:04 AMPhBastiani
09/06/2019, 9:10 AMPhBastiani
09/06/2019, 9:16 AMsimon.vergauwen
09/06/2019, 9:41 AMPhBastiani
09/06/2019, 12:09 PM