The issue was that before Generate.hs was using Text.readFile which uses openFile. It was changed to use File.lazyReadTextUtf8 which is also lazy, but uses withFile (which closes the file at the end). Apparently withFile, and closing files in general is not compatible with lazy reads.
The issue was that before Generate.hs was using
Text.readFile
which usesopenFile
. It was changed to useFile.lazyReadTextUtf8
which is also lazy, but useswithFile
(which closes the file at the end). ApparentlywithFile
, and closing files in general is not compatible with lazy reads.