
24 Feb
2010
24 Feb
'10
9:41 p.m.
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