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 ...
Gyromagnetic asked 5/11, 2013 at 16:25

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...
Angelita asked 15/8, 2013 at 11:48

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...
Perlis asked 29/7, 2013 at 18:3

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...
Plassey asked 26/3, 2013 at 0:35

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...
Lette asked 24/3, 2013 at 2:37

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...
Roomful asked 25/2, 2013 at 2:9

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.
Interlocutory asked 7/8, 2012 at 11:2

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) ...
Krystlekrystyna asked 14/7, 2012 at 6:58

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...
Hospitalization asked 13/7, 2012 at 17:0

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. ...
Trawl asked 31/5, 2012 at 13:37

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...
Inkstand asked 28/1, 2012 at 4:10

© 2022 - 2024 — McMap. All rights reserved.