`pipes` is a group of libraries written in Haskell to provide safe, functional, and strict I/O.
Questions tagged [haskell-pipes]
139 questions
0
votes
1 answer
How to use bidirectional pipes properly?
I am trying to use pipes to model a problem for which bidirectional Proxy instances would be ideal. Basically, I have something like the following architecture:
api logic
| ^
| |
v |
A A'
layer 1
B B'
| ^
| |
v …

insitu
- 4,488
- 3
- 25
- 42
0
votes
1 answer
Serializing values to JSON array with pipes
I'd like to serialize incoming values to JSON. Every value has a toJSON instance. The end result should be a list. The current code is the following:
import Pipes
import qualified Pipes.Prelude as P
-- assume a source of elements
main :: IO ()
main…

rubik
- 8,814
- 9
- 58
- 88
0
votes
1 answer
Parsing a stream of JSON with pipes-aeson
Given a simple example JSON type:
data Test = Test
{ name :: Text
, age :: Int
} deriving (Show, Generic)
instance FromJSON Test
How can I use pipes-aeson to decode a stream of JSON messages coming over a socket using the decoded lens? As…

jhickner
- 1,043
- 10
- 15
0
votes
1 answer
Pipes.Safe - how to use mapM
I have the following code with a pipe which is ok without the second pipe (>-> P.mapM ( fillMD5)). fillMD5 is an operation a -> IO a.
runSafeT $ runEffect $
every (senseRecursive5 startfpo)
>-> P.mapM ( fillMD5)
>-> P.map…

user855443
- 2,596
- 3
- 25
- 37