In the pipes
package, the tutorial Control.Pipes.Tutorial
[1] shows how to "vertically stack" pipe components using the monad >>
operator.
How would I go about doing that with Control.Frame?
For example, using the definitions from the Control.Frame tutorial:
source1 = fromList [1..10]
source2 = fromList [30..40]
-- combine two sources:
runFrame $ printer <-< (source1 ??? source2)
-- combine two transformers:
runFrame $ printer <-< (take' 3 ??? take' 2) <-< fromList [1..]
Using >>
here for ???
doesn't typecheck.
[1] http://hackage.haskell.org/packages/archive/pipes/latest/doc/html/Control-Pipe-Tutorial.html#g:4
Update: Here is a paste of what I've been trying: http://hpaste.org/77986
It looks like close
is the problem -- see the function bar8
in the above paste.
The frames are composable with >>
if I don't explicitly close
them. Of course, I eventually need to close them. Hmmm....