-{-# OPTIONS_GHC -fno-implicit-prelude #-}
+{-# OPTIONS_GHC -XNoImplicitPrelude #-}
--------------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Pool
) where
#ifdef __GLASGOW_HASKELL__
-import GHC.Base ( Int, Monad(..), IsString(..), (.), not )
+import GHC.Base ( Int, Monad(..), (.), not )
import GHC.Err ( undefined )
-import GHC.Exception ( block, unblock, throw, catchException )
-import GHC.IOBase ( IO, IORef, newIORef, readIORef, writeIORef, )
+import GHC.Exception ( throw )
+import GHC.IOBase ( IO, IORef, newIORef, readIORef, writeIORef,
+ block, unblock, catchAny )
import GHC.List ( elem, length )
import GHC.Num ( Num(..) )
#else
withPool act = -- ATTENTION: cut-n-paste from Control.Exception below!
block (do
pool <- newPool
- val <- catchException
+ val <- catchAny
(unblock (act pool))
(\e -> do freePool pool; throw e)
freePool pool