Why does the following program compile and produce the results it does? It seems like 3 and "x" got interpreted as the same type, (). Thanks in advance for your help. import Data.IORef import System.IO.Unsafe
cell = unsafePerformIO $ newIORef [] push i = modifyIORef cell (++ [i]) main = do push 3 push "x" readIORef cell >>= return *Main> :browse cell :: GHC.IORef.IORef [a] push :: a -> IO () main :: IO [a] *Main> main [(),()] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe