doc wibble: nonstrict -> non-strict
[ghc-base.git] / Foreign / Marshal / Pool.hs
index 754b484..47e4f86 100644 (file)
@@ -48,8 +48,8 @@ module Foreign.Marshal.Pool (
 import GHC.Base              ( Int, Monad(..), (.), not )
 import GHC.Err               ( undefined )
 import GHC.Exception         ( throw )
-import GHC.IOBase            ( IO, IORef, newIORef, readIORef, writeIORef
-                               block, unblock, catchAny )
+import GHC.IO                ( IO, block, unblock, catchAny )
+import GHC.IORef             ( IORef, newIORef, readIORef, writeIORef )
 import GHC.List              ( elem, length )
 import GHC.Num               ( Num(..) )
 #else
@@ -57,7 +57,7 @@ import Data.IORef            ( IORef, newIORef, readIORef, writeIORef )
 #if defined(__NHC__)
 import IO                    ( bracket )
 #else
-import Control.Exception     ( bracket )
+import Control.Exception.Base ( bracket )
 #endif
 #endif
 
@@ -143,7 +143,7 @@ pooledRealloc = pr undefined
 pooledReallocBytes :: Pool -> Ptr a -> Int -> IO (Ptr a)
 pooledReallocBytes (Pool pool) ptr size = do
    let cPtr = castPtr ptr
-   throwIf (not . (cPtr `elem`)) (\_ -> "pointer not in pool") (readIORef pool)
+   _ <- throwIf (not . (cPtr `elem`)) (\_ -> "pointer not in pool") (readIORef pool)
    newPtr <- reallocBytes cPtr size
    ptrs <- readIORef pool
    writeIORef pool (newPtr : delete cPtr ptrs)