
5 Oct
2003
5 Oct
'03
5:37 a.m.
On Sun, Oct 05, 2003 at 04:25:41AM -0000, kuq32tr02@sneakemail.com wrote:
2. main = do text <- readFile "test" let something = somefunc text writeFile "test" $! something
Are both of these correct (guaranteed to give the behavior I want)? Which is better (and why)?
There is no guarantee that $! will force evaluation of the entire 'something', so you can start writing to file before you finished reading from it. Hopefully it will cause an exception (like in GHC), otherwise you could damage your data (like in Hugs). PS. How does it behave in NHC?
Thanks!
Best regards, Tom -- .signature: Too many levels of symbolic links