Closed mitchellwrosen closed 9 years ago
Yeah, definitely! Only one minor nitpick: could you connect the b
and b'
in the first two like the examples from Pipes.Core
(such as this one)?
Oh yeah! I forgot about those. How about the "simplified" functions ('for' vs. (//>)) are coupled with simplified diagrams, and a hyperlink to the more general one? I've updated the PR to show you what I mean.
That sounds like a good idea. The only thing I'd suggest is omitting the x
from the simplified diagram for for
.
Even though it's part of the downstream flow? Just above the diagram are aliases to 'for' which include Pipe x b m r -> (b -> Pipe x c m ()) -> Pipe x c m r
and others.
Another thought, I think the type variables in the "real" and "equivalent" type signatures should match up, i.e. either change a'
to r
or vice-versa. However, I'm sure you had a good reason for naming the result type a'
so feel free to veto this as well :)
Never mind. Keep it the way it is. I realized that you were aiming for the most general unidirectional version.
I found the pipes graphics from
Pipes.Tutorial
really helpful. Do you think it would be overkill to add them to the documentation for pipes combinators as well? This patch includes just one example but I'll gladly make the rest if you think it's a good idea.