What caused this “delayed read on closed handle” error?
问题 I just installed GHC from the latest sources, and now my program gives me an error message about a "delayed read on closed handle". What does this mean? 回答1: The fundamental lazy I/O primitive, hGetContents , produces a String lazily—it only reads from the handle as needed to produce the parts of the string your program actually demands. Once the handle has been closed, however, it is no longer possible to read from the handle, and if you try to inspect a part of the string that was not yet