First of all, sorry if this is a really silly question, but I couldn't
figure it out from experimenting in GHCi and from the GHC libraries
documentation (or Google).

Is there an IORef consturctor? Or is it just internal to the Data.IORef module?

I want a "global variable", so I did the following:

------
module VirtualWorld where
 import Data.IORef
 theWorld = IORef [] -- This will be writeIORef'ed with a populated
list as the user modifies the world.
-----

It doesn't work. GHCi says that the IORef constructor is not in scope.
I did a ":module Data.IORef" and then "IORef []" and it still gives me
the same error.

I'm using GHC 6.6 on Windows.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to