import System.IO.Unsafe
#ifdef __GLASGOW_HASKELL__
-#ifdef mingw32_HOST_OS
import Foreign.C.String
-#endif
+#else
+import System.IO (hPutStrLn,stderr)
#endif
-- | 'putTraceMsg' function outputs the trace message from IO monad.
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 ->