The latest version of lazyio is 0.1.0.4-1.
lazyio
Version 0.1.0.4 revision 0 uploaded by HenningThielemann.
Package meta
- Synopsis
- Run IO actions lazily while respecting their order
- Description
Run IO actions lazily while respecting their order. Running a value of the LazyIO monad in the IO monad is like starting a thread which is however driven by its output. That is, the LazyIO action is only executed as far as necessary in order to provide the required data.
The package may help you to avoid stack overflows in
mapM
. Say you havemapM f xs
where
xs
is a long list. When run, you may encounter a stack overflow. To prevent it, write instead:import qualified System.IO.Lazy as LazyIO LazyIO.run $ mapM (LazyIO.interleave . f) xs
The stack overflow is gone.
- Author
- Henning Thielemann <haskell@henning-thielemann.de>
- Bug reports
- n/a
- Category
- Monads, Control
- Copyright
- n/a
- Homepage
- http://www.haskell.org/haskellwiki/Lazy_IO
- Maintainer
- Henning Thielemann <haskell@henning-thielemann.de>
- Package URL
- n/a
- Stability
- n/a