[akka-user] Re: [akka-http] Tagless Final and ToResponseMarshallable

2017-06-19 Thread Juan José Vázquez Delgado
In order to avoid the mix-in, you should rely on ad-hoc polymorphism, i.e. use implicits to get an evidence of a Marshaller for your type. `Marshaller` is basically a typeclass so stick to that pattern in your solution. El jueves, 15 de junio de 2017, 23:21:17 (UTC+2), Jeff escribió: > > That

[akka-user] Re: [akka-http] Tagless Final and ToResponseMarshallable

2017-06-15 Thread Jeff
That gave me a lot of inspiration, much thanks. I've adapted that into the following pattern: abstract class RestaurantRoutes[F[_]: Monad](algebra: RestaurantAlgebra[F]) extends MonadToResponseMarshaller[F] { import algebra._ def route: Route = path("api" / "v4.0" / "restaurant" /

[akka-user] Re: [akka-http] Tagless Final and ToResponseMarshallable

2017-06-13 Thread Juan José Vázquez Delgado
I've faced a similar situation recently working on this example . It's not easy but is definitely feasible. The bottom line is: run your own marshaller. El martes, 13 de junio de 2017, 18:44:01 (UTC+2), Jeff escribió: > > I am trying to learn