[Haskell-cafe] (New to Conduits) mixing lazy lists and Conduits?

Michael Snoyman michael at snoyman.com
Thu Jun 21 10:46:10 UTC 2018


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 at 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 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180621/ba90ea98/attachment.html>


More information about the Haskell-Cafe mailing list