summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEdward Tjörnhammar <ed@cflags.cc>2015-04-02 00:02:48 +0200
committerEdward Tjörnhammar <ed@cflags.cc>2015-04-02 00:02:48 +0200
commit62cc285b565ee6b25ce3807a5b8b66d897f55800 (patch)
treebd0a07b7e35ad4ad8ad8a9ee67a773784de48937
parent11a5d22aa5ff9d4139d5986d405a6cb0b94359cc (diff)
downloadxmobar-62cc285b565ee6b25ce3807a5b8b66d897f55800.tar.gz
xmobar-62cc285b565ee6b25ce3807a5b8b66d897f55800.tar.bz2
Make M an Applicative instance
-rw-r--r--src/Plugins/EWMH.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Plugins/EWMH.hs b/src/Plugins/EWMH.hs
index 5f1c0c4..c014aec 100644
--- a/src/Plugins/EWMH.hs
+++ b/src/Plugins/EWMH.hs
@@ -1,5 +1,5 @@
{-# OPTIONS_GHC -w #-}
-{-# LANGUAGE CPP, NamedFieldPuns, GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE CPP, NamedFieldPuns, GeneralizedNewtypeDeriving, FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
@@ -17,6 +17,7 @@
module Plugins.EWMH (EWMH(..)) where
+import Control.Applicative (Applicative(..))
import Control.Monad.State
import Control.Monad.Reader
import Graphics.X11 hiding (Modifier, Color)
@@ -176,7 +177,7 @@ clientHandlers = [ ("_NET_WM_NAME", updateName)
, ("_NET_WM_DESKTOP", updateDesktop) ]
newtype M a = M (ReaderT EwmhConf (StateT EwmhState IO) a)
- deriving (Monad, Functor, MonadIO, MonadReader EwmhConf, MonadState EwmhState)
+ deriving (Monad, Functor, Applicative, MonadIO, MonadReader EwmhConf, MonadState EwmhState)
execM :: M a -> IO a
execM (M m) = do