Hi, is-it possible to have a partial lifting into ...
# arrow
p
Hi, is-it possible to have a partial lifting into an Arrow Free Monad ?
r
Conceptually yes, do you have some code where you are trying that?
p
No specific UC. I would like to merge 2 basic DSL. I'm using 2 interpreters with Id as container. EitherK is a good candidate for my Coproduct. But now, I need an instance of Inject; and, then I should create parametrized classes to lift my ADT. Is the right way ?
r
yes but in Kotlin that is a pain and also not recomended because the Coproduct will be slower as you increase the number of ADTs
We faced this problem in freestyle and solved it indexing the FunctionK and the EitherK
to obtain constant time access to algebra evaluation but in Kotlin everything you can do with Free you can also do with Tagless Final without the need for a coproduct and faster encoding since it’s based on functions which tne you can still interpret to a target monad
p
Ok thx, i'll try that... it't a good exercice ! I'm not concerned about performance here... And, yes, i'll play with TaglessFinal in a near future !