
21 Nov
2008
21 Nov
'08
1:18 a.m.
2008/11/20 Peter Verswyvelen
Now in Reactive, in e.g. the internal IVar.hs module, I see readIVar :: IVar a -> a readIVar (IVar v) = unsafePerformIO $ readMVar v At first sight this function is not following all the rules described above. Could this cause problems?
I cannot prove it formally, but I think it does not. readMVar does not have observable side-effects, assuming the MVar is never taken (which is what IVar's abstraction ensures). Luke