On Fri, Jun 10, 2005 at 07:32:42PM +0200, Lennart Augustsson wrote: > Andre Pang wrote: > >G'day all, > > > >Just looking at the documentation for System.IO.unsafeInterleaveIO, > >what exactly is unsafe about it? > You pick. :) > > It can break referential transparency. It can break type safety. > > -- Lennart >
Are you sure you're not talking about unsafePerformIO? System.IO.Unsafe.unsafePerformIO :: IO a -> a System.IO.Unsafe.unsafeInterleaveIO :: IO a -> IO a As far as I know unsafeInterleaveIO in general isn't any unsafer than it's "special cases" getContents / hGetContents / readFile / getChanContents. Although fighting lazy IO might occasionally drive someone mad, which could arguably be called "unsafe". Cheers, Remi -- Nobody can be exactly like me. Even I have trouble doing it.
pgpxOF8lzrZuS.pgp
Description: PGP signature
_______________________________________________ Glasgow-haskell-users mailing list [email protected] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
