From: malcolm Date: Mon, 31 Jan 2005 13:52:26 +0000 (+0000) Subject: [project @ 2005-01-31 13:52:26 by malcolm] X-Git-Tag: nhc98-1-18-release~52 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=66bcbe67b61d83cb01b6d2c876e7b06e034fba88;p=haskell-directory.git [project @ 2005-01-31 13:52:26 by malcolm] Make it compile for non-GHC. --- diff --git a/Debug/Trace.hs b/Debug/Trace.hs index 5bc7128..3e369f5 100644 --- a/Debug/Trace.hs +++ b/Debug/Trace.hs @@ -23,6 +23,8 @@ import System.IO.Unsafe #ifdef __GLASGOW_HASKELL__ import Foreign.C.String +#else +import System.IO (hPutStrLn,stderr) #endif -- | 'putTraceMsg' function outputs the trace message from IO monad. @@ -32,8 +34,7 @@ import Foreign.C.String putTraceMsg :: String -> IO () putTraceMsg msg = do #ifndef __GLASGOW_HASKELL__ - hPutStr handle msg - hPutChar handle '\n' + hPutStrLn stderr msg #else withCString "%s\n" $ \cfmt -> withCString msg $ \cmsg ->