snoyberg/conduit — pull request #91 by joeyadams (2013-03-08 02:49:05+00:00)
Title: Refactor some of Data.Conduit.Internal for readability

While playing around with Pipes, I found a slightly nicer way to write `pipe`, `pipeL`, and `connectResume`: use two mutually recursive functions (called `goLeft` and `goRight`) instead of one. This allows more eta-reduction, and clarifies the similarities and transitions between the right pipe and the left pipe. It might also improve performance, since it avoids matching the same `right` over and over while processing the left pipe.

This should be a purely mechanical transformation. Please check it over to make sure things look right. Tests pass on GHC 7.0.3, 7.4.2, and 7.6.2.