
2 Feb
2003
2 Feb
'03
5:11 p.m.
On Fri, 31 Jan 2003, Jon Cast wrote:
Otherwise, though, see my other post on this subject: unsafePerformIO will perform its action when the variable is accessed, so you can't write a Haskell program which differentiates between what any compiler actually does and running the variable allocations before main.
If you initialize this "global variable" with a value from a file which is changed by main (or over time) then order does matter. I claim unsafePerformIO is very often unsafe - the question is more like if the "level of unsafety" is acceptable for a particular application. /Patrik