From 66bcbe67b61d83cb01b6d2c876e7b06e034fba88 Mon Sep 17 00:00:00 2001 From: malcolm Date: Mon, 31 Jan 2005 13:52:26 +0000 Subject: [PATCH] [project @ 2005-01-31 13:52:26 by malcolm] Make it compile for non-GHC. --- Debug/Trace.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -> -- 1.7.10.4