From: rrt Date: Thu, 12 Jul 2001 10:37:55 +0000 (+0000) Subject: [project @ 2001-07-12 10:37:55 by rrt] X-Git-Tag: Approximately_9120_patches~1575 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=43ad8a63088166e7c0dcf4b977a17f0caf0a432c;p=ghc-hetmet.git [project @ 2001-07-12 10:37:55 by rrt] Change access to errorHdrHook back into a foreign label (this is now supported by the NCG, or should be, and in any case, we don't build HSstd with the NCG). --- diff --git a/ghc/lib/std/PrelTopHandler.lhs b/ghc/lib/std/PrelTopHandler.lhs index 2e7bf2c..0b6bf8d 100644 --- a/ghc/lib/std/PrelTopHandler.lhs +++ b/ghc/lib/std/PrelTopHandler.lhs @@ -1,5 +1,5 @@ -- ----------------------------------------------------------------------------- --- $Id: PrelTopHandler.lhs,v 1.2 2001/05/22 15:06:47 simonmar Exp $ +-- $Id: PrelTopHandler.lhs,v 1.3 2001/07/12 10:37:55 rrt Exp $ -- -- (c) The University of Glasgow, 2001 -- @@ -62,13 +62,12 @@ reportError :: Bool -> String -> IO () reportError bombOut str = do (hFlush stdout) `catchException` (\ _ -> return ()) withCStringLen str $ \(cstr,len) -> do - writeErrString addrOf_ErrorHdrHook cstr len + writeErrString errorHdrHook cstr len if bombOut then stg_exit 1 else return () -foreign import ccall "addrOf_ErrorHdrHook" unsafe - addrOf_ErrorHdrHook :: Ptr () +foreign label "ErrorHdrHook" errorHdrHook :: Ptr () foreign import ccall "writeErrString__" unsafe writeErrString :: Ptr () -> CString -> Int -> IO ()