summaryrefslogtreecommitdiff
path: root/libraries/base/Debug
diff options
context:
space:
mode:
authormalcolm <unknown>2005-01-31 13:52:26 +0000
committermalcolm <unknown>2005-01-31 13:52:26 +0000
commitc8d9c29b142275d388160dc848cc35d8a6f6f151 (patch)
treebf7acd1435a8c248f0973e72321f944fd5ca30d3 /libraries/base/Debug
parent40793bd07d7dcf773510fefcda92fdfe85e18d2e (diff)
downloadhaskell-c8d9c29b142275d388160dc848cc35d8a6f6f151.tar.gz
[project @ 2005-01-31 13:52:26 by malcolm]
Make it compile for non-GHC.
Diffstat (limited to 'libraries/base/Debug')
-rw-r--r--libraries/base/Debug/Trace.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/libraries/base/Debug/Trace.hs b/libraries/base/Debug/Trace.hs
index 5bc71280c9..3e369f5e18 100644
--- a/libraries/base/Debug/Trace.hs
+++ b/libraries/base/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 ->