conduit Questions
2
Solved
Is it safe to perform multiple actions using the same conduit value? Something like
do
let sink = sinkSocket sock
something $$ sink
somethingElse $$ sink
I recall that in the early versions ...
1
Solved
Why is such simple code not working?
import Network.HTTP.Conduit
import qualified Data.ByteString.Lazy as L
main :: IO ()
main = simpleHttp "http://www.dir.bg/" >>= L.putStr
It results in...
Ogdan asked 3/10, 2013 at 12:50
2
Solved
I'm trying to understand pipes 4.0, and want to convert some conduit code. Suppose I have a stream of Ints, and I'd like to skip the first five, then get the sum of the following 5. Using plain lis...
Carrico asked 24/9, 2013 at 5:20
1
Solved
A view days ago, I asked this question. Now I need a pure single threaded version of this function:
To repeat, I need a function that sends each received value to each sink and collects their resu...
1
Solved
I write a program which counts the frequencies of NGrams in a corpus. I already have a function that consumes a stream of tokens and produces NGrams of one single order:
ngram :: Monad m => Int...
1
Solved
In my GHC Haskell application utilizing stm, network-conduit and conduit, I have a strand for each socket which is forked automatically using runTCPServer. Strands can communicate with other strand...
Overwork asked 26/5, 2013 at 7:25
1
Solved
I'd like to learn the concept, so that I'd be able to understand and use libraries such as machines.
I tried to follow Rúnar Bjarnason's talk on machines, but there is too little information, basi...
Bick asked 24/6, 2013 at 17:36
1
Solved
Getting started with conduit, and I noticed that in Data.Conduit.Util:
Utility functions from older versions of conduit. These should be considered deprecated, as there are now easier ways to ha...
2
I am trying to create a conduit that can consume multiple input streams. I need to be able to await on one or the other of the input streams in no particular order (e.g., not alternating) making zi...
2
Solved
I'm trying to understand the differences between conduit and pipes. Unlike pipes, conduit has the concept of leftovers. What are leftovers useful for? I'd like to see some examples where leftovers ...
Pontus asked 6/3, 2013 at 21:38
2
Solved
I'm trying to understand the differences between different implementations of the concept of pipes. One of the differences between conduit and pipes is how they fuse pipes together. Conduit has
(&...
Each asked 6/3, 2013 at 21:27
2
Solved
I've written a daemon in Haskell that scrapes information from a webpage every 5 minutes.
The daemon originally ran fine for about 50 minutes, but then it unexpectedly died with out of memory (req...
2
Solved
It seems to me that there is a strong connection between the two ideas. My guess is that FRP could be implemented in terms of Iteratees if there would be a way to express arbitrary graphs with Iter...
Housecarl asked 17/12, 2012 at 19:20
1
Solved
The goal is to have a conduit with the following type signature
protobufConduit :: MonadResource m => (ByteString -> a) -> Conduit ByteString m a
The conduit should repeatedly parse proto...
Demonstration asked 24/9, 2012 at 16:13
2
I've used zipSinks :: Monad m => Sink i m r -> Sink i m r' -> Sink i m (r, r') for this but it is considered deprecated.
2
Solved
I'd like to hear from someone with a deeper understanding than myself what the fundamental differences are between Enumerators, Conduits, and Pipes as well as the key benefits and drawbacks. Some d...
Paving asked 2/4, 2012 at 21:7
2
Solved
I was hoping to see a nondeterministic interleaving operation for sources, with a type signature like
interleave :: WhateverIOMonadClassItWouldWant m => [(k, Source m a)] -> Source m (k, a)
...
4
Solved
I am trying to write a simple cat program in Haskell. I would like to take multiple filenames as arguments, and write each file sequentially to STDOUT, but my program only prints one file and exits...
1
Solved
I have a simple task - read a bunch of lines out of a file and do something with each one of them. Except the first one - which are some headings to be ignored.
So I thought I'd try out conduits.
...
1
Solved
I'm trying to write a Conduit using an attoparsec parser. Specifically, given parseOne :: Parser T, I'd like to construct a Conduit ByteString m T that repeatedly applies the parser to the input an...
© 2022 - 2024 — McMap. All rights reserved.