lazyio: Run IO actions lazily while respecting their order
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 have
mapM 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.
Downloads
- lazyio-0.1.0.6.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.0.1, 0.0.2, 0.0.3, 0.0.3.1, 0.0.3.2, 0.0.3.3, 0.1, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4, 0.1.0.5, 0.1.0.6 |
|---|---|
| Change log | CHANGES |
| Dependencies | base (>=4.8 && <5), transformers (>=0.2 && <0.7), unsafe (>=0.0 && <0.1) [details] |
| Tested with | ghc ==6.8.2, ghc ==6.12.1, ghc ==7.4.1, ghc ==7.6.3 |
| License | BSD-3-Clause |
| Author | Henning Thielemann <haskell@henning-thielemann.de> |
| Maintainer | Henning Thielemann <haskell@henning-thielemann.de> |
| Uploaded | by HenningThielemann at 2026-06-03T09:50:41Z |
| Category | Monads, Control |
| Home page | http://www.haskell.org/haskellwiki/Lazy_IO |
| Source repo | head: darcs get http://code.haskell.org/~thielema/lazyio/ this: darcs get http://code.haskell.org/~thielema/lazyio/ --tag 0.1.0.6 |
| Distributions | LTSHaskell:0.1.0.4, Stackage:0.1.0.6 |
| Reverse Dependencies | 4 direct, 4 indirect [details] |
| Downloads | 9591 total (39 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2026-06-03 [all 1 reports] |