diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-09 08:38:10 +0100 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-09 08:38:10 +0100 |
commit | 1e58cdd9e81ad6e4d7775713a70c9e1daeb7289c (patch) | |
tree | 05df678438fc853ae2deb686e91492e90b08d6ab | |
parent | e9dcbd261bf2886f1d4ee9c076441ac5d9b515d9 (diff) | |
download | XMonadContrib-1e58cdd9e81ad6e4d7775713a70c9e1daeb7289c.tar.gz XMonadContrib-1e58cdd9e81ad6e4d7775713a70c9e1daeb7289c.tar.xz XMonadContrib-1e58cdd9e81ad6e4d7775713a70c9e1daeb7289c.zip |
Generalize safe/unsafeSpawn to MonadIO
darcs-hash:20071109073810-a5988-634efa9c3c56f39ea64be1b29791bb61c54eb6bd.gz
-rw-r--r-- | XMonad/Util/Run.hs | 6 |
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. |