Discord is now Scala’s main chat platform. Please join us at https://discord.com/invite/scala
~>
is?
A[_[_]]
, e.g. trait MyDbAlg[F[_]] { ... do stuff ...}
I actually am more with Martin on this one, I think that Monad Transformers are a terrible abstraction so I can see why he is skeptical
@mdedetrich Thats' not what I meant: I meant that even though mtl style
was born to solve a problem with transformers, it's very useful regardless, just like even though the Web was created to solve the problem of sharing scientific articles at CERN, it's now very useful regardless
HFunctor
exists in scalaz as compose https://github.com/scalaz/scalaz/blob/series/7.3.x/core/src/main/scala/scalaz/Functor.scala#L62-L66
mapT :: (Monad m, Monad n) => (forall a. m a -> n a) -> t m b -> t n b
this is from the MFunctor
lib (naming on this wildly varies)
FFunctor
(or FunctorK
in cats) is (* -> *) -> *
@mdedetrich agree to disagree :)
The benefit to complexity ratio of final tagless is excellent imho. But to each their own, no big deal
encoding languages as their interpreters
. e.g. Scalatags uses parametrization over F[_]
to render to either Strings, js.Element
s, or React VDom snippets. You compose a bunch of methods that return F[T]
, it returns a bigger F[T]
, and it looks just like any example of finally tagless that i've ever seen. Is Scalatags then finally tagless?