Hi Fabian
>From the source viewable in the Haddock docs supplied with GHC
- hGetContents calls lazyRead:
hGetContents :: Handle -> IO String
hGetContents handle =
wantReadableHandle "hGetContents" handle $ \handle_ -> do
xs <- lazyRead handle
return (handle_{ haType=SemiClosedHandle}, xs )
- lazyRead :
lazyRead :: Handle -> IO String
lazyRead handle =
unsafeInterleaveIO $
<<stuff>>
hGetContents is using unsafeInterleaveIO already so you don't have to.
Best wishes
Stephen
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe