From 62cc285b565ee6b25ce3807a5b8b66d897f55800 Mon Sep 17 00:00:00 2001 From: Edward Tjörnhammar Date: Thu, 2 Apr 2015 00:02:48 +0200 Subject: Make M an Applicative instance --- src/Plugins/EWMH.hs | 5 +++-- 1 file 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 -- cgit v1.2.3