diff options
author | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-07 04:21:39 +0100 |
---|---|---|
committer | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-07 04:21:39 +0100 |
commit | a0a1cfcf5d82c01738f0ca6f4e3c04dd8422a437 (patch) | |
tree | 8d7adeafd13e29b2735551f066428fa8e2cbb78a /Wm.hs | |
parent | b01dc05c971408a6484bb347e4822880dae55db3 (diff) | |
download | metatile-a0a1cfcf5d82c01738f0ca6f4e3c04dd8422a437.tar metatile-a0a1cfcf5d82c01738f0ca6f4e3c04dd8422a437.zip |
comments for Main.hs, add io_, like io but return ()
darcs-hash:20070307032139-9c5c1-b063c7a18960d67fabf03d42b6b9d01a855c9cf5
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 |