[project @ 2005-01-31 13:52:26 by malcolm]
authormalcolm <unknown>
Mon, 31 Jan 2005 13:52:26 +0000 (13:52 +0000)
committermalcolm <unknown>
Mon, 31 Jan 2005 13:52:26 +0000 (13:52 +0000)
Make it compile for non-GHC.

Debug/Trace.hs

index 5bc7128..3e369f5 100644 (file)
@@ -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 ->