diff options
author | Brent Yorgey <byorgey@gmail.com> | 2008-02-04 20:23:48 +0100 |
---|---|---|
committer | Brent Yorgey <byorgey@gmail.com> | 2008-02-04 20:23:48 +0100 |
commit | bf1034609caf8b353fe0d05a3773e24de0cb33ec (patch) | |
tree | c34196c5ee17f20d8f501ca8114f334d076836a4 /XMonad | |
parent | e73316e3ab2540ca3580cfbe07478d7e374e0ff9 (diff) | |
download | xmonad-bf1034609caf8b353fe0d05a3773e24de0cb33ec.tar.gz xmonad-bf1034609caf8b353fe0d05a3773e24de0cb33ec.tar.xz xmonad-bf1034609caf8b353fe0d05a3773e24de0cb33ec.zip |
Core.hs: add an Applicative instance for X
darcs-hash:20080204192348-bd4d7-6a4edc163de3ea931a60050e4ad107390afc972e.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Core.hs | 4 |
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 |