Lazy I/O is the standard solution to this in the current base libraries, but has its problems. We explain how lazy I/O works, what the problems are, and explore some of the solutions that are being proposed at the moment: iteratees, pipes, stream I/O, etc.
YOU MAY ALSO LIKE:
- Sharing is Caring? Comparing Ownership in Haskell and Rust (SkillsCast recorded in December 2022)
- Haskell In Person: Bring Your Project, Get help with your code & socialise (in Berlin on 1st February 2023)
- An Introduction to Functional Reactive Programming and Yampa (in Zürich on 2nd February 2023)
- Teaching Haskell...To High Schoolers! (SkillsCast recorded in December 2022)
- Teaching Haskell...To High Schoolers! (SkillsCast recorded in December 2022)
Lazy I/O and Alternatives in Haskell
Edsko de Vries
Edsko has been using Haskell for nearly 20 years, and has been a professional Haskell consultant with Well-Typed for roughly half that time. He holds a PhD in advanced (substructural) type systems for pure functional languages from Trinity College, Dublin.
As a Well-Typed consultant, he has provided training across the world, from Johannesburg to Boston to Singapore. He has worked on a large variety of projects, both open source as well as closed source for specific clients. Some of the open source projects he has contributed to are Cloud Haskell, Hackage, the Hackage security library, ghc, Ziria (a DSL developed by Microsoft) and cabal. Some general purpose libraries he has (co)developed include generics-sop, nothunks, recover-rtti and large-records.
The last few years he has worked as a consultant with IOHK on the Cardano blockchain, where he was responsible for the overall architecture of the consensus layer, designed the hard fork combinator, and did research on formal specification of a crypto wallet and invented a novel coin selection algorithm.