
22 Oct
2009
22 Oct
'09
1:25 a.m.
zaxis
let aaa = unsafePerformIO $ newIORef [] writeIORef aaa [1,2,3] readIORef aaa [(),(),()]
What in Haskells name do you think you're doing? Don't use unsafePerformIO like that! Its unnecessary and a bit concerning, really. Prelude> :m Data.IORef Prelude Data.IORef> x <- newIORef [] :: IO (IORef [Int]) Prelude Data.IORef> writeIORef x [1,2,3] Prelude Data.IORef> readIORef x [1,2,3]
sincerely! -- View this message in context: http://www.nabble.com/why-cannot-i-get-the-value-of-a-IORef-variable---tp260... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe