From a5c6b3dcc4d33bc81d55c3ba08a8e333400c4c65 Mon Sep 17 00:00:00 2001 From: Daniel Schoepe Date: Mon, 9 Nov 2009 21:15:43 +0100 Subject: Minor style corrections in X.U.SpawnOnce Ignore-this: 1264852c23b4f84b2580bf4567529c68 darcs-hash:20091109201543-7f603-550d81edf3aecf9eaf4de25736e61d36adc8524c.gz --- XMonad/Util/SpawnOnce.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'XMonad/Util') diff --git a/XMonad/Util/SpawnOnce.hs b/XMonad/Util/SpawnOnce.hs index edb3b5f..fc05222 100644 --- a/XMonad/Util/SpawnOnce.hs +++ b/XMonad/Util/SpawnOnce.hs @@ -26,14 +26,14 @@ data SpawnOnce = SpawnOnce { unspawnOnce :: (Set String) } deriving (Read, Show, Typeable) instance ExtensionClass SpawnOnce where - initialValue = SpawnOnce $ Set.empty + initialValue = SpawnOnce Set.empty extensionType = PersistentExtension -- | The first time 'spawnOnce' is executed on a particular command, that -- command is executed. Subsequent invocations for a command do nothing. spawnOnce :: String -> X () spawnOnce xs = do - b <- fmap (Set.member xs . unspawnOnce) $ getState + b <- fmap (Set.member xs . unspawnOnce) getState when (not b) $ do spawn xs modifyState (SpawnOnce . Set.insert xs . unspawnOnce) -- cgit v1.2.3