
thank you! In fact i really donot understand "unsafePerformIO" very much ! Thomas DuBuisson wrote:
zaxis
wrote: 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
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- 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.