Ah  I see. I made another version of `repeatedly` modeled on the io-streams
`Streams.parserToInputStreams` (but using `parseL` as a model) 
http://lpaste.net/101263 
It has the type 

repeatedly :: Monad m
        => Parser a -> Producer PB.ByteString m r
        -> Producer a m  (Producer PB.ByteString m r)

I don't know if it fits with the general tenor of pipes-attoparsec, but it 
fits with
the sort of picture Gabriel was suggesting for `pipes-text`. The 'error'
is just that we revert to the bytestring producer. (Oh, it occurs, I could 
have
abstracted over bytestring v. text).  Anyway, I mention it because, 
using it for pipes2 in that revised module I get:


    $ for i in streams pipes1 pipes2; do (echo $i && time ./iostreamsbench 
$i); done
    streams
    12500002500000 real 0m1.255s user 0m1.110s sys 0m0.035s
    
    pipes1
    12500002500000 real 0m4.495s user 0m4.428s sys 0m0.065s
    
    pipes2
    12500002500000 real 0m0.840s user 0m0.811s sys 0m0.028s

which pleases.

-- 
You received this message because you are subscribed to the Google Groups 
"Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to