Re:Parallel streaming in Haskell: Part 4 – Conditionals and ...
by grumpyprole on Wednesday January 25, 2023 @04:06PM
(#34524184)
Arrows do imply certain behaviours, if the laws are to be satisfied. For example, they require synchronous streams. This means one can't really do things like coalescing very easily.
Re:Parallel streaming in Haskell: Part 4 – Conditionals and ...
by yoricksijsling on Wednesday January 25, 2023 @04:40PM
(#34524547)
I never really used Arrows, let alone stream transformers with an Arrow interface, but yes that makes sense. With the conduit library you’d use ZipConduit which has the same characteristics.
On reddit, in reply to the first blog post, someone asked how ZipConduit compared to our parallel streams. Maybe that’s helpful for hosh as well. https://www.reddit.com/r/haskell/comments/10339fe/comment/j2...
You can have stream transformers that fit in de arrow class, and parallel composition might then mean that things are done concurrently. How that compares to our approach entirely depends on the exact stream transformer implementation.
Note that the ConduitT type that we use doesn’t really fit in the Arrow class, due to the additional parameter for the return type.