Jules Bean wrote:
By the same token, you can just stick the function strangeReadFile :: FilePath -> String into the language. As long as it is memoized, always returning the same value, it doesn't break beta-reduction. I call it 'strange' because the time that the file is actually read is not guaranteed, so if you read more than one file in your program, you have no guarantee that you are reading a constant total state that actually existed at any point in time. (Before you think this sounds unbearably horrible, there is at least one commercially sold RDBMS which has this semantics on its select statements ;P)

It is also strange by the fact that strangeReadFile can very well be different functions at different runs of the program. That's why I think such a function should be generated by the IO monad. (If you want it at all!)

        -- Lennart
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to