mark System.IO.openTempFile as non-portable in haddocks
[haskell-directory.git] / GHC / TopHandler.lhs
index 686b027..44ac461 100644 (file)
@@ -123,16 +123,16 @@ cleanUpAndExit r = do cleanUp; safeExit r
 -- we have to use unsafeCoerce# to get the 'IO a' result type, since the
 -- compiler doesn't let us declare that as the result type of a foreign export.
 safeExit :: Int -> IO a
-safeExit r = unsafeCoerce# (shutdownHaskellAndExit r)
+safeExit r = unsafeCoerce# (shutdownHaskellAndExit $ fromIntegral r)
 
 -- NOTE: shutdownHaskellAndExit must be called "safe", because it *can*
 -- re-enter Haskell land through finalizers.
-foreign import ccall "shutdownHaskellAndExit" 
-  shutdownHaskellAndExit :: Int -> IO ()
+foreign import ccall "Rts.h shutdownHaskellAndExit"
+  shutdownHaskellAndExit :: CInt -> 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}