X.U.ExtensibleState: style

This commit is contained in:
Spencer Janssen 2009-11-08 18:28:58 +00:00
parent 0efee8b0cb
commit a3fb5f5df1

View File

@ -21,7 +21,6 @@ module XMonad.Util.ExtensibleState (
, getState , getState
) where ) where
import Control.Applicative
import Data.Typeable (typeOf,Typeable,cast) import Data.Typeable (typeOf,Typeable,cast)
import qualified Data.Map as M import qualified Data.Map as M
import XMonad.Core import XMonad.Core
@ -77,7 +76,7 @@ modifyStateExts f = modify $ \st -> st { extensibleState = f (extensibleState st
-- | Apply a function to a stored value of the matching type or the initial value if there -- | Apply a function to a stored value of the matching type or the initial value if there
-- is none. -- is none.
modifyState :: ExtensionClass a => (a -> a) -> X () modifyState :: ExtensionClass a => (a -> a) -> X ()
modifyState f = putState =<< f <$> getState modifyState f = putState . f =<< getState
-- | Add a value to the extensible state field. A previously stored value with the same -- | Add a value to the extensible state field. A previously stored value with the same
-- type will be overwritten. (More precisely: A value whose string representation of its type -- type will be overwritten. (More precisely: A value whose string representation of its type