On 2009 Jan 1, at 16:44, Henning Thielemann wrote:
If it is generally possible to use unsafeInterleaveIO such that it
executes actions in the right order, wouldn't this allow the
definition
of a general lazy IO monad?
I thought unsafeInterleaveIO and users of it (readFile, hGetContents)
didn't guarantee the order of actions relative to independent IO
actions (that is, those performed outside the unsafeInterleaveIO) and
this was why it is generally disrecommended. For example the
recurring situation where people try to readFile f >>= writeFile .
someTransform and the writeFile fails with a "file locked" exception.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe