diff options
author | Daniel Wagner <daniel@wagner-home.com> | 2013-05-28 02:35:31 +0200 |
---|---|---|
committer | Daniel Wagner <daniel@wagner-home.com> | 2013-05-28 02:35:31 +0200 |
commit | 2b99912405588e4adaa735e6f15a98394fce4083 (patch) | |
tree | 7935f915d4cd57b6ebc14c438c6050845d18accf /XMonad/Core.hs | |
parent | 5adebf2cde6555d51f5feaab90887ed11c4a9237 (diff) | |
download | xmonad-2b99912405588e4adaa735e6f15a98394fce4083.tar.gz xmonad-2b99912405588e4adaa735e6f15a98394fce4083.tar.xz xmonad-2b99912405588e4adaa735e6f15a98394fce4083.zip |
depend on data-default, and deprecate the monomorphic name defaultConfig
Ignore-this: 1e746731695df3b6f684d5463a3da6a4
darcs-hash:20130528003531-76d51-cb0d530829e7ad54445399456421f3fa7fe231df.gz
Diffstat (limited to 'XMonad/Core.hs')
-rw-r--r-- | XMonad/Core.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/XMonad/Core.hs b/XMonad/Core.hs index 569f9f9..112d1e4 100644 --- a/XMonad/Core.hs +++ b/XMonad/Core.hs @@ -37,6 +37,7 @@ import Control.Exception.Extensible (catch, fromException, try, bracket, throw, import Control.Applicative import Control.Monad.State import Control.Monad.Reader +import Data.Default import System.FilePath import System.IO import System.Info @@ -149,6 +150,9 @@ instance (Monoid a) => Monoid (X a) where mempty = return mempty mappend = liftM2 mappend +instance Default a => Default (X a) where + def = return def + type ManageHook = Query (Endo WindowSet) newtype Query a = Query (ReaderT Window X a) deriving (Functor, Monad, MonadReader Window, MonadIO) @@ -160,6 +164,9 @@ instance Monoid a => Monoid (Query a) where mempty = return mempty mappend = liftM2 mappend +instance Default a => Default (Query a) where + def = return def + -- | Run the 'X' monad, given a chunk of 'X' monad code, and an initial state -- Return the result, and final state runX :: XConf -> XState -> X a -> IO (a, XState) |