Using a single Haskell pipe to split HTTP content to two consumers
<p>I can't really figure out whether some of <a href="https://stackoverflow.com/questions/16205440/haskell-pipes-and-branching">these</a> <a href="https://stackoverflow.com/questions/29932852/how-to-merge-two-consumer-into-one-in-haskell-pipes">other</a> <a href="https://stackoverflow.com/questions/33464543/forking-the-streaming-flow-in-haskell-pipes">questions</a> are similar enough to mine but I couldn't extract a solution out of them so I'm posting. Feel free to indicate to me otherwise.</p>

<p>I have a flow where I need to download a large CSV file, and 1) save it to disk, and 2) process it. I'd like to use Haskell pipes, with the <a href="https://hackage.haskell.org/package/pipes-http" rel="nofollow noreferrer">pipes-http</a> and <a href="https://hackage.haskell.org/package/pipes-csv" rel="nofollow noreferrer">pipes-csv</a> packages to do this. </p>

<p>The obvious way is to have two separate pipes: 1) web -> disk, and then 2) disk -> process. Is it possible to do another topology where the output from the web splits into two consumers, one that saves and the other that processes? I feel that this could be more elegant and possibly more efficient. </p>

<p>If so, how is the splitting done? Splitting of pipes is not mentioned anywhere in the documentation.</p>