From a8f3699055c4437c2ec788542e6b264414785e3e Mon Sep 17 00:00:00 2001 From: ross Date: Fri, 23 May 2003 10:48:55 +0000 Subject: [PATCH] [project @ 2003-05-23 10:48:55 by ross] replace deriving Eq with explicit instance (twice) because Haddock's limited understanding of derived instances can't figure out these two. --- GHC/IOBase.lhs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/GHC/IOBase.lhs b/GHC/IOBase.lhs index 048d2bb..d8e61d6 100644 --- a/GHC/IOBase.lhs +++ b/GHC/IOBase.lhs @@ -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) @@ -415,7 +419,11 @@ writeIORef (IORef var) v = stToIO (writeSTRef var v) -- -- -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) -- 1.7.10.4