[cvs-nhc98] Tentative fix to allow nhc98 to build itself again.
Malcolm Wallace
malcolm@sparud.net
Mon, 26 Mar 2001 13:23:49 +0200 (CEST)
malcolm: Mon Mar 26 13:23:49 CEST 2001
Update of /usr/src/master/nhc/src/prelude/IO
In directory hinken:/tmp/cvs-serv3307
Modified Files:
OpenFile.hs
Log Message:
Tentative fix to allow nhc98 to build itself again.
We have been getting segfaults recently when nhc98 is built by
itself. I think it is a problem with the newish implementation of
openFile. The returned Addr was converted to a ForeignObj lazily -
which probably meant that the ForeignObj was being finalised before
it was actually placed into the program graph! This change puts
the prim operation addrToForeignObj into the IO monad, to force
immediate evaluation.