mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
Generalize the type of whenJust
This commit is contained in:
parent
f81ec95fa0
commit
a5200b3862
@ -281,7 +281,7 @@ restart mprog resume = do
|
||||
where showWs = show . mapLayout show
|
||||
|
||||
-- | Run a side effecting action with the current workspace. Like 'when' but
|
||||
whenJust :: Maybe a -> (a -> X ()) -> X ()
|
||||
whenJust :: Monad m => Maybe a -> (a -> m ()) -> m ()
|
||||
whenJust mg f = maybe (return ()) f mg
|
||||
|
||||
-- | Conditionally run an action, using a X event to decide
|
||||
|
Loading…
x
Reference in New Issue
Block a user