Lazy I/O in Haskell System.IO retaining file handles in long-running processes
Lazy I/O and Resource Retention Lazy I/O operations in Haskell's System.IO module defer file reading until data is actually consumed. This lazy evaluation model can cause file handles to remain open longer than expected in long-running computations, particularly when intermediate processing stages retain references to unevaluated thunks containing I/O action