Here is a strawman program which illustrates the issue I am having trait RequestBuilder { type Out
def complete(p: Promise[Out]): Unit } def makeRequest(in: RequestBuilder): Source[(RequestBuilder, Promise[in.Out]), Future[in.Out]] = { val p = Promise[in.Out] Source.single(in -> p).mapMaterializedValue(_ => p.future) } val sink = MergeHub.source[(RequestBuilder, Promise[???])].to(Sink.foreach { case (r, p) => r.complete(p) }).run() sink.runWith(makeRequest(new RequestBuilder { type Out = Int def complete(p: Promise[Out]): Unit = p.success(1) })) The issue is, how do I type the Promise[???] in the sink? I have been able to work around this by making the Promise a part of the RequestBuilder trait itself, but this seems like a code smell to me -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.