summaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorBrent Yorgey <byorgey@gmail.com>2008-02-04 20:23:48 +0100
committerBrent Yorgey <byorgey@gmail.com>2008-02-04 20:23:48 +0100
commit27777de6f100ab09b8df2f50323b0b22fb2f4afc (patch)
treec34196c5ee17f20d8f501ca8114f334d076836a4 /XMonad
parent5527b3cc904c315e921a11da0e9f59f9642d5396 (diff)
downloadmetatile-27777de6f100ab09b8df2f50323b0b22fb2f4afc.tar
metatile-27777de6f100ab09b8df2f50323b0b22fb2f4afc.zip
Core.hs: add an Applicative instance for X
darcs-hash:20080204192348-bd4d7-6a4edc163de3ea931a60050e4ad107390afc972e
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Core.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/XMonad/Core.hs b/XMonad/Core.hs
index d7ea521..ea84bd6 100644
--- a/XMonad/Core.hs
+++ b/XMonad/Core.hs
@@ -121,6 +121,10 @@ newtype X a = X (ReaderT XConf (StateT XState IO) a)
deriving (Functor, Monad, MonadIO, MonadState XState, MonadReader XConf)
#endif
+instance Applicative X where
+ pure = return
+ (<*>) = ap
+
instance (Monoid a) => Monoid (X a) where
mempty = return mempty
mappend = liftM2 mappend