haskellconduit

Is it possible to combine sequence and join for monadically created ConduitTs that have actions in the same monad?


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.


Solution

  • 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