[Haskell-cafe] RE: [ANN] Safe Lazy IO in Haskell
nicolas.pouillard at gmail.com
Tue Mar 24 08:43:31 EDT 2009
Excerpts from Wei Hu's message of Mon Mar 23 17:37:15 +0100 2009:
> Nicolas Pouillard <nicolas.pouillard <at> gmail.com> writes:
> > Hi folks,
> > We have good news (nevertheless we hope) for all the lazy guys standing there.
> > Since their birth, lazy IOs have been a great way to modularly leverage all the
> > good things we have with *pure*, *lazy*, *Haskell* functions to the real world
> > of files.
> > We are happy to present the safe-lazy-io package  that does exactly this
> > and is going to be explained and motivated in the rest of this post.
> Please let me know if I understood your code correctly. So, the SIO
> module is used only to ensure that the file processing is finished
> before the finalizer closes the file, right?
> In System.IO.Lazy.Input, run is defined as
> > run :: NFData sa => LI sa -> IO sa
> > run = run' . fmap return'
> Can I change it to
> > run = run' . fmap return
> I think the semantics is the same because run' will strictly force the
> processing anyway?
Exactly I've pushed the change to the repository 
Thanks for spotting this!
More information about the Haskell-Cafe