Warm tip: This article is reproduced from stackoverflow.com, please click
haskell conduit

Is it possible to combine sequence and join for monadically created ConduitTs that have actions in t

发布于 2020-04-07 23:14:45

In other words, is it possible to somehow combine something like sequence and join to have a function:

m (ConduitT a b m c) -> ConduitT a b m c

One immediate problem seems to be that ConduitT doesn't have a Foldable instance, though there are fold functions available. Though in any case, this may be barking up the wrong tree.

Questioner
bbarker
Viewed
65
Li-yao Xia 2020-02-01 03:54

ConduitT is a monad transformer: it implements lift :: m x -> ConduitT a b m x.

join . lift :: m (ConduitT a b m c) -> ConduitT a b m c