diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-10-12 17:15:24 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-10-12 17:15:24 +0200 |
commit | 79a2509eec15de0b88df078a9f8b19cd39b241a7 (patch) | |
tree | f720724fdfea7c018a50867db5b47a2a96c0564d | |
parent | 6af9d782c39a3fe57bdb798fcfc8c561df29e333 (diff) | |
download | xmonad-79a2509eec15de0b88df078a9f8b19cd39b241a7.tar.gz xmonad-79a2509eec15de0b88df078a9f8b19cd39b241a7.tar.xz xmonad-79a2509eec15de0b88df078a9f8b19cd39b241a7.zip |
Make runX return XState
darcs-hash:20071012151524-a5988-8ef9d310d3e0576b5880c1e8b3d3fc38ec3b8f64.gz
-rw-r--r-- | XMonad.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -81,8 +81,8 @@ newtype X a = X (ReaderT XConf (StateT XState IO) a) -- | Run the X monad, given a chunk of X monad code, and an initial state -- Return the result, and final state -runX :: XConf -> XState -> X a -> IO () -runX c st (X a) = runStateT (runReaderT a c) st >> return () +runX :: XConf -> XState -> X a -> IO (a, XState) +runX c st (X a) = runStateT (runReaderT a c) st -- | Run in the X monad, and in case of exception, and catch it and log it -- to stderr, and run the error case. |