diff options
author | Lukas Mai <l.mai@web.de> | 2008-02-29 22:17:32 +0100 |
---|---|---|
committer | Lukas Mai <l.mai@web.de> | 2008-02-29 22:17:32 +0100 |
commit | 2deabb56b4e8dac665df53adcf60a0eb59045428 (patch) | |
tree | 323a1e9dcf0f414f0bdada2fc6a3d8e03f528725 /XMonad | |
parent | 00f8a18b0d6825777bd544384f6cc4c06f837530 (diff) | |
download | XMonadContrib-2deabb56b4e8dac665df53adcf60a0eb59045428.tar.gz XMonadContrib-2deabb56b4e8dac665df53adcf60a0eb59045428.tar.xz XMonadContrib-2deabb56b4e8dac665df53adcf60a0eb59045428.zip |
XMonad.Actions.MouseGestures.mkCollect: generalize type
darcs-hash:20080229211732-462cf-01169e7d9e548b87da8b1f2662bedb8619f35add.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Actions/MouseGestures.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/XMonad/Actions/MouseGestures.hs b/XMonad/Actions/MouseGestures.hs index 1fc47e5..0a20cc5 100644 --- a/XMonad/Actions/MouseGestures.hs +++ b/XMonad/Actions/MouseGestures.hs @@ -125,16 +125,16 @@ mouseGesture tbl win = do -- collect mouse movements (and return the current gesture as a list); the end -- hook will return a list of the completed gesture, which you can access with -- 'Control.Monad.>>='. -mkCollect :: (MonadIO m) => m (Direction -> X [Direction], X [Direction]) +mkCollect :: (MonadIO m, MonadIO m') => m (Direction -> m' [Direction], m' [Direction]) mkCollect = liftIO $ do acc <- newIORef [] let - mov d = io $ do + mov d = liftIO $ do ds <- readIORef acc let ds' = d : ds writeIORef acc ds' return $ reverse ds' - end = io $ do + end = liftIO $ do ds <- readIORef acc writeIORef acc [] return $ reverse ds |