diff options
author | malcolm <unknown> | 2005-01-31 13:52:26 +0000 |
---|---|---|
committer | malcolm <unknown> | 2005-01-31 13:52:26 +0000 |
commit | c8d9c29b142275d388160dc848cc35d8a6f6f151 (patch) | |
tree | bf7acd1435a8c248f0973e72321f944fd5ca30d3 /libraries/base/Debug | |
parent | 40793bd07d7dcf773510fefcda92fdfe85e18d2e (diff) | |
download | haskell-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.hs | 5 |
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 -> |