summaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-11-09 07:42:14 +0100
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-11-09 07:42:14 +0100
commit9d13cf57b31055d21f51257d73c9c946c18b6b44 (patch)
treea5bb278b6a76405e8ff9a0f885be915edd9e573d /XMonad
parent2bae2a4816fd0fb241bd5db0b66efee098ce1924 (diff)
downloadmetatile-9d13cf57b31055d21f51257d73c9c946c18b6b44.tar
metatile-9d13cf57b31055d21f51257d73c9c946c18b6b44.zip
Generalize several functions to MonadIO
darcs-hash:20071109064214-a5988-9d6f69bc6314fd4e4a58edff8442715a5b016400
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Core.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/XMonad/Core.hs b/XMonad/Core.hs
index 56700c0..2a6a715 100644
--- a/XMonad/Core.hs
+++ b/XMonad/Core.hs
@@ -258,8 +258,8 @@ catchIO :: IO () -> X ()
catchIO f = liftIO (f `catch` \e -> hPrint stderr e >> hFlush stderr)
-- | spawn. Launch an external application
-spawn :: String -> X ()
-spawn x = io $ do
+spawn :: MonadIO m => String -> m ()
+spawn x = liftIO $ do
pid <- forkProcess $ do
forkProcess (createSession >> executeFile "/bin/sh" False ["-c", x] Nothing)
exitWith ExitSuccess
@@ -291,5 +291,5 @@ whenX a f = a >>= \b -> when b f
-- | A 'trace' for the X monad. Logs a string to stderr. The result may
-- be found in your .xsession-errors file
-trace :: String -> X ()
-trace msg = io $! do hPutStrLn stderr msg; hFlush stderr
+trace :: MonadIO m => String -> m ()
+trace msg = liftIO $ do hPutStrLn stderr msg; hFlush stderr