[project @ 2003-05-30 09:19:39 by simonpj]
[ghc-base.git] / GHC / IOBase.lhs
index cf3c5eb..d8e61d6 100644 (file)
@@ -391,7 +391,11 @@ data BufferMode
 -- IORefs
 
 -- |A mutable variable in the 'IO' monad
-newtype IORef a = IORef (STRef RealWorld a) deriving Eq
+newtype IORef a = IORef (STRef RealWorld a)
+
+-- explicit instance because Haddock can't figure out a derived one
+instance Eq (IORef a) where
+  IORef x == IORef y = x == y
 
 -- |Build a new 'IORef'
 newIORef    :: a -> IO (IORef a)
@@ -409,13 +413,17 @@ writeIORef (IORef var) v = stToIO (writeSTRef var v)
 -- | An 'IOArray' is a mutable, boxed, non-strict array in the 'IO' monad.  
 -- The type arguments are as follows:
 --
---  * @i@: the index type of the array (should be an instance of @Ix@)
+--  * @i@: the index type of the array (should be an instance of 'Ix')
 --
 --  * @e@: the element type of the array.
 --
 -- 
 
-newtype IOArray i e = IOArray (STArray RealWorld i e) deriving Eq
+newtype IOArray i e = IOArray (STArray RealWorld i e)
+
+-- explicit instance because Haddock can't figure out a derived one
+instance Eq (IOArray i e) where
+  IOArray x == IOArray y = x == y
 
 -- |Build a new 'IOArray'
 newIOArray :: Ix i => (i,i) -> e -> IO (IOArray i e)