Hi, is-it possible to have a partial lifting into an Arrow Free Monad ?
r
raulraja
08/29/2019, 4:00 PM
Conceptually yes, do you have some code where you are trying that?
p
PhBastiani
08/29/2019, 5:57 PM
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
raulraja
08/29/2019, 7:52 PM
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
raulraja
08/29/2019, 7:53 PM
We faced this problem in freestyle and solved it indexing the FunctionK and the EitherK
raulraja
08/29/2019, 7:54 PM
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
PhBastiani
08/30/2019, 8:02 AM
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 !