aboutsummaryrefslogtreecommitdiffstats
path: root/W.hs
diff options
context:
space:
mode:
Diffstat (limited to 'W.hs')
-rw-r--r--W.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/W.hs b/W.hs
index 0dc3e16..016baaa 100644
--- a/W.hs
+++ b/W.hs
@@ -10,7 +10,8 @@
--
-----------------------------------------------------------------------------
--
--- The W monad, a state monad transformer over IO, for the window manager state.
+-- The W monad, a state monad transformer over IO, for the window
+-- manager state, and support routines.
--
module W where
@@ -70,6 +71,12 @@ trace msg = io $ do
hPutStrLn stderr msg
hFlush stderr
+--
+-- | Run an action forever
+--
+forever :: (Monad m) => m a -> m b
+forever a = a >> forever a
+
-- ---------------------------------------------------------------------
-- Getting at the window manager state