
7 Dec
2008
7 Dec
'08
7:28 p.m.
Hi, Is the following safe? moo :: TVar Int moo = unsafePerformIO $ newTVarIO 1 I'm interested in writing a stateful application, and I wanted to start with writing some IO functions that did stuff on some state and then test them over long periods of time in GHCi. I was worried I might be depending on some guarantees that aren't actually there, like moo being discarded and recreated inbetween invocations of different functions. Thanks, -John