projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
510ea89
)
Reshuffle GHC.Conc/GHC.TopHandler a bit to remove a recursive import
author
Ian Lynagh
<igloo@earth.li>
Fri, 1 Aug 2008 21:18:01 +0000
(21:18 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Fri, 1 Aug 2008 21:18:01 +0000
(21:18 +0000)
GHC/Conc.lhs
patch
|
blob
|
history
GHC/TopHandler.lhs
patch
|
blob
|
history
diff --git
a/GHC/Conc.lhs
b/GHC/Conc.lhs
index
1b61036
..
a584d31
100644
(file)
--- a/
GHC/Conc.lhs
+++ b/
GHC/Conc.lhs
@@
-95,6
+95,7
@@
module GHC.Conc
, win32ConsoleHandler
, toWin32ConsoleEvent
#endif
, win32ConsoleHandler
, toWin32ConsoleEvent
#endif
+ , reportError, reportStackOverflow
) where
import System.Posix.Types
) where
import System.Posix.Types
@@
-104,10
+105,6
@@
import System.Posix.Internals
import Foreign
import Foreign.C
import Foreign
import Foreign.C
-#ifndef __HADDOCK__
-import {-# SOURCE #-} GHC.TopHandler ( reportError, reportStackOverflow )
-#endif
-
import Data.Maybe
import GHC.Base
import Data.Maybe
import GHC.Base
@@
-127,6
+124,8
@@
import GHC.Ptr ( Ptr(..), plusPtr, FunPtr(..) )
import GHC.STRef
import GHC.Show ( Show(..), showString )
import Data.Typeable
import GHC.STRef
import GHC.Show ( Show(..), showString )
import Data.Typeable
+import GHC.Err
+import Control.Exception hiding (throwTo)
infixr 0 `par`, `pseq`
\end{code}
infixr 0 `par`, `pseq`
\end{code}
@@
-1252,4
+1251,17
@@
foreign import ccall unsafe "sizeof_fd_set"
#endif
#endif
+reportStackOverflow :: IO a
+reportStackOverflow = do callStackOverflowHook; return undefined
+
+reportError :: SomeException -> IO a
+reportError ex = do
+ handler <- getUncaughtExceptionHandler
+ handler ex
+ return undefined
+
+-- SUP: Are the hooks allowed to re-enter Haskell land? If so, remove
+-- the unsafe below.
+foreign import ccall unsafe "stackOverflow"
+ callStackOverflowHook :: IO ()
\end{code}
\end{code}
diff --git
a/GHC/TopHandler.lhs
b/GHC/TopHandler.lhs
index
ac6523b
..
39f4a4f
100644
(file)
--- a/
GHC/TopHandler.lhs
+++ b/
GHC/TopHandler.lhs
@@
-169,20
+169,6
@@
real_handler exit se@(SomeException exn) =
exit 1
exit 1
-reportStackOverflow :: IO a
-reportStackOverflow = do callStackOverflowHook; return undefined
-
-reportError :: SomeException -> IO a
-reportError ex = do
- handler <- getUncaughtExceptionHandler
- handler ex
- return undefined
-
--- SUP: Are the hooks allowed to re-enter Haskell land? If so, remove
--- the unsafe below.
-foreign import ccall unsafe "stackOverflow"
- callStackOverflowHook :: IO ()
-
-- try to flush stdout/stderr, but don't worry if we fail
-- (these handles might have errors, and we don't want to go into
-- an infinite loop).
-- try to flush stdout/stderr, but don't worry if we fail
-- (these handles might have errors, and we don't want to go into
-- an infinite loop).