aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Util
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-11-09 08:38:10 +0100
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-11-09 08:38:10 +0100
commit1e58cdd9e81ad6e4d7775713a70c9e1daeb7289c (patch)
tree05df678438fc853ae2deb686e91492e90b08d6ab /XMonad/Util
parente9dcbd261bf2886f1d4ee9c076441ac5d9b515d9 (diff)
downloadXMonadContrib-1e58cdd9e81ad6e4d7775713a70c9e1daeb7289c.tar.gz
XMonadContrib-1e58cdd9e81ad6e4d7775713a70c9e1daeb7289c.tar.xz
XMonadContrib-1e58cdd9e81ad6e4d7775713a70c9e1daeb7289c.zip
Generalize safe/unsafeSpawn to MonadIO
darcs-hash:20071109073810-a5988-634efa9c3c56f39ea64be1b29791bb61c54eb6bd.gz
Diffstat (limited to 'XMonad/Util')
-rw-r--r--XMonad/Util/Run.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/XMonad/Util/Run.hs b/XMonad/Util/Run.hs
index fad92cd..e90e828 100644
--- a/XMonad/Util/Run.hs
+++ b/XMonad/Util/Run.hs
@@ -104,9 +104,9 @@ seconds = fromEnum . (* 1000000)
$HOME and interpolation, whereas the safeSpawn example can be safe because Firefox doesn't need any arguments if it is
just being started.
-}
-safeSpawn :: FilePath -> String -> X ()
-safeSpawn prog arg = io (try (forkProcess $ executeFile prog True [arg] Nothing) >> return ())
-unsafeSpawn :: String -> X ()
+safeSpawn :: MonadIO m => FilePath -> String -> m ()
+safeSpawn prog arg = liftIO (try (forkProcess $ executeFile prog True [arg] Nothing) >> return ())
+unsafeSpawn :: MonadIO m => String -> m ()
unsafeSpawn = spawn
-- | Run a given program in the preferred terminal emulator. This uses safeSpawn.