diff options
Diffstat (limited to 'Wm.hs')
-rw-r--r-- | Wm.hs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -33,9 +33,18 @@ newtype Wm a = Wm (StateT WmState IO a) runWm :: Wm a -> WmState -> IO (a, WmState) runWm (Wm m) = runStateT m +-- +-- | Lift an IO action into the Wm monad +-- io :: IO a -> Wm a io = liftIO +-- +-- | Lift an IO action into the Wm monad, discarding any result +-- +io_ :: IO a -> Wm () +io_ f = liftIO f >> return () + trace msg = io $ do hPutStrLn stderr msg hFlush stderr |