You can use Data.Conduit.Lazy for this.

https://www.stackage.org/haddock/lts-11.14/conduit-extra-1.3.0/Data-Conduit-Lazy.html

On Thu, Jun 21, 2018, 12:13 PM Jon Fairbairn <jon.fairbairn@cl.cam.ac.uk> wrote:

Suppose I’m writing some code using Conduits, but need to use
some old function f::[a]->[b] (defined in a library somewhere)
that transforms a lazy list.

Is there a way of turning f into a Conduit without ending up
with all of the list being in memory? ie something that looks
like

toConduit:: ([a]->[b]) -> ConduitT a b m ()

I’ve got nowhere with Hoogle or Hayoo
--
Jón Fairbairn                                 Jon.Fairbairn@cl.cam.ac.uk

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.