withCString msg $ \cmsg ->
errorBelch cfmt cmsg
-foreign import ccall unsafe errorBelch :: CString -> CString -> IO ()
+foreign import ccall unsafe "RtsMessages.h errorBelch"
+ errorBelch :: CString -> CString -> IO ()
setUncaughtExceptionHandler :: (Exception -> IO ()) -> IO ()
setUncaughtExceptionHandler = writeIORef uncaughtExceptionHandler
withCString msg $ \cmsg ->
debugBelch cfmt cmsg
-foreign import ccall unsafe debugBelch :: CString -> CString -> IO ()
+foreign import ccall unsafe "RtsMessages.h debugBelch"
+ debugBelch :: CString -> CString -> IO ()
#endif
{-# NOINLINE trace #-}
-- NOTE: shutdownHaskellAndExit must be called "safe", because it *can*
-- re-enter Haskell land through finalizers.
-foreign import ccall "shutdownHaskellAndExit"
+foreign import ccall "Rts.h shutdownHaskellAndExit"
shutdownHaskellAndExit :: Int -> IO ()
fastExit :: Int -> IO a
fastExit r = unsafeCoerce# (stg_exit (fromIntegral r))
-foreign import ccall "stg_exit"
+foreign import ccall "Rts.h stg_exit"
stg_exit :: CInt -> IO ()
\end{code}