refactor trace.

This commit is contained in:
Don Stewart
2007-11-14 03:41:09 +00:00
parent 4887c5ac42
commit 0d506daf45

View File

@@ -292,4 +292,4 @@ whenX a f = a >>= \b -> when b f
-- | A 'trace' for the X monad. Logs a string to stderr. The result may -- | A 'trace' for the X monad. Logs a string to stderr. The result may
-- be found in your .xsession-errors file -- be found in your .xsession-errors file
trace :: MonadIO m => String -> m () trace :: MonadIO m => String -> m ()
trace msg = liftIO $ do hPutStrLn stderr msg; hFlush stderr trace = liftIO . hPutStrLn stderr