Merijn Verstraaten
unread,Sep 20, 2017, 11:21:21 AM9/20/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haskel...@googlegroups.com
Hi,
In my current code I have a "myPipe :: Pipe Foo Bar m r" (that consumes any number of inputs) and a "myProd :: Producer Bar m r" (that produces a finite number of outputs) that I want to combine so that the Producer runs after the pipe exhausts all it's input. Given an "inputProducer :: Producer Foo m r" I can write "(inputProducer >-> myPipe) >> myProd" to get the desired effect, but this is horrible thing for users of my code to have to write.
Is there any way I can achieve this reasonably nicely? Ideally I'd like some way to combine my pipe and producer into a single "Pipe Foo Bar m r" in various ways (like returning my producer from the pipe and calling join), but since the pipe consumes any number of inputs that just results in my producer never running. Any suggestions?
Cheers,
Merijn