import GHC.IOBase (block, unblock, evaluate, catchException, throwIO)
import qualified GHC.IOBase as ExceptionBase
import qualified GHC.IOBase as New
-import GHC.Exception hiding ( Exception )
import GHC.Conc hiding (setUncaughtExceptionHandler,
getUncaughtExceptionHandler)
import Data.IORef ( IORef, newIORef, readIORef, writeIORef )
#endif
import qualified Control.Exception as New
+import Control.Exception ( throw, SomeException )
import System.IO.Error hiding ( catch, try )
import System.IO.Unsafe (unsafePerformIO)
import Data.Dynamic
INSTANCE_TYPEABLE0(Exception,exceptionTc,"Exception")
nonTermination :: SomeException
-nonTermination = toException NonTermination
+nonTermination = New.toException NonTermination
-- For now at least, make the monolithic Exception type an instance of
-- the Exception class
partitionEithers, -- :: [Either a b] -> ([a],[b])
) where
-import Data.Tuple
+import Data.Tuple ()
#ifdef __GLASGOW_HASKELL__
import GHC.Base
#include "HsBaseConfig.h"
#endif
--- system dependent imports
--- ------------------------
-
--- GHC allows us to get at the guts inside IO errors/exceptions
---
-#if __GLASGOW_HASKELL__
-import GHC.IOBase (IOException(..), IOErrorType(..))
-#endif /* __GLASGOW_HASKELL__ */
-
-
--- regular imports
--- ---------------
-
-import Foreign.Storable
import Foreign.Ptr
import Foreign.C.Types
import Foreign.C.String
) where
import Data.Maybe
-import Foreign.Ptr ( Ptr, nullPtr, FunPtr )
import Foreign.C.Types ( CSize )
import Foreign.Storable ( Storable(sizeOf) )
+#ifndef __GLASGOW_HASKELL__
+import Foreign.Ptr ( Ptr, nullPtr, FunPtr )
+#endif
+
#ifdef __GLASGOW_HASKELL__
import Foreign.ForeignPtr ( FinalizerPtr )
import GHC.IOBase
advancePtr, -- :: Storable a => Ptr a -> Int -> Ptr a
) where
-import Control.Monad
import Foreign.Ptr (Ptr, plusPtr)
import Foreign.Storable (Storable(sizeOf,peekElemOff,pokeElemOff))
import Foreign.Marshal.Alloc (mallocBytes, allocaBytes, reallocBytes)
import {-# SOURCE #-} GHC.Handle
import GHC.IOBase
import GHC.Num ( Num(..) )
-import GHC.Real ( fromIntegral, div )
-#ifndef mingw32_HOST_OS
-import GHC.Base ( Int(..) )
+import GHC.Real ( fromIntegral )
+#ifdef mingw32_HOST_OS
+import GHC.Real ( div )
+import GHC.Ptr ( plusPtr, FunPtr(..) )
#endif
#ifdef mingw32_HOST_OS
import GHC.Read ( Read )
#endif
import GHC.Exception ( SomeException(..), throw )
import GHC.Pack ( packCString# )
-import GHC.Ptr ( Ptr(..), plusPtr, FunPtr(..) )
+import GHC.Ptr ( Ptr(..) )
import GHC.STRef
import GHC.Show ( Show(..), showString )
import Data.Typeable
, checkResult
) where
-import GHC.Prim
import GHC.Base
import GHC.Exception
-import GHC.IO
import GHC.IOBase
import GHC.Ptr
-import Foreign.Marshal.Array
import Foreign.Marshal.Alloc
-import Foreign.Storable
import Foreign.C.String
data Object a
#ifndef __HADDOCK__
import GHC.Base
import GHC.IOBase
-import GHC.List ( span )
+import GHC.List ()
import GHC.Exception
#endif
\end{code}
import GHC.Base
import GHC.Word
import GHC.Int
-import GHC.Num
import GHC.Float
import GHC.Ptr
import Data.String
) where
import Control.Monad
-import Data.Bits
import Data.Maybe
import Foreign
import Foreign.C
import GHC.Enum
import GHC.Num ( Integer(..), Num(..) )
import GHC.Show
-import GHC.Real ( toInteger )
#if defined(DEBUG_DUMP)
import GHC.Pack
#endif
import GHC.Exception
#ifndef __HADDOCK__
-import {-# SOURCE #-} Data.Typeable ( Typeable, showsTypeRep )
-import {-# SOURCE #-} Data.Dynamic ( Dynamic, dynTypeRep )
+import {-# SOURCE #-} Data.Typeable ( Typeable )
+import {-# SOURCE #-} Data.Dynamic ( Dynamic )
#endif
-- ---------------------------------------------------------------------------
import Prelude
-import GHC.ST ( ST(..), STRep, runST )
+import GHC.ST ( ST(..), runST )
import GHC.Exts ( Int#, Array#, Int(I#), MutableArray#, newArray#,
unsafeFreezeArray#, indexArray#, writeArray#, (<#), (>=#) )
import GHC.Base
import GHC.Real (fromIntegral)
import GHC.Int
-import GHC.Word
import GHC.Num (fromInteger)
#include "HsBaseConfig.h"
#ifndef __HUGS__
import Control.Monad
import System.IO
-import Text.Read
-import Text.Show
import Data.List
import Data.Either
import Data.Maybe
-import Data.Bool
import Data.Tuple
-import Data.Eq
-import Data.Ord
#endif
#ifdef __GLASGOW_HASKELL__
import GHC.Base
import GHC.IOBase
-import GHC.Exception
+import GHC.Exception ( throw )
import GHC.Read
import GHC.Enum
import GHC.Num
import GHC.Err ( error, undefined )
#endif
-import qualified Control.OldException as Old
+import qualified Control.OldException as Old hiding ( throw )
#ifdef __HUGS__
import Hugs.Prelude
#ifdef __GLASGOW_HASKELL__
import GHC.Base
import GHC.IOBase
-import GHC.Exception
import Text.Show
#endif