diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2014-07-10 18:39:50 +0200 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2014-07-10 18:39:50 +0200 |
commit | 7de2796a2448a33ef4ed80111681bd6175f57477 (patch) | |
tree | 08a190bd0c09c83039cf606ad4c6b67a88cea6cc /XMonad/Util | |
parent | 61e3488be86e7b11916bf23b4a0bc3826570e5df (diff) | |
download | XMonadContrib-7de2796a2448a33ef4ed80111681bd6175f57477.tar.gz XMonadContrib-7de2796a2448a33ef4ed80111681bd6175f57477.tar.xz XMonadContrib-7de2796a2448a33ef4ed80111681bd6175f57477.zip |
derive Applicative instances to suppress AMP warning
Ignore-this: c2110d07bccc61462c3fbf73c900aaa1
darcs-hash:20140710163950-1499c-ee7151d0314d7c5f154782c2099a02377311aaf3.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Util/Invisible.hs | 4 | ||||
-rw-r--r-- | XMonad/Util/WindowState.hs | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/XMonad/Util/Invisible.hs b/XMonad/Util/Invisible.hs index fc18180..2fa8b2b 100644 --- a/XMonad/Util/Invisible.hs +++ b/XMonad/Util/Invisible.hs @@ -22,13 +22,15 @@ module XMonad.Util.Invisible ( , fromIMaybe ) where +import Control.Applicative + -- $usage -- A wrapper data type to store layout state that shouldn't be persisted across -- restarts. A common wrapped type to use is @Maybe a@. -- Invisible derives trivial definitions for Read and Show, so the wrapped data -- type need not do so. -newtype Invisible m a = I (m a) deriving (Monad, Functor) +newtype Invisible m a = I (m a) deriving (Monad, Applicative, Functor) instance (Functor m, Monad m) => Read (Invisible m a) where readsPrec _ s = [(fail "Read Invisible", s)] diff --git a/XMonad/Util/WindowState.hs b/XMonad/Util/WindowState.hs index 5b19a20..4ffc93e 100644 --- a/XMonad/Util/WindowState.hs +++ b/XMonad/Util/WindowState.hs @@ -26,7 +26,7 @@ import XMonad hiding (get, put, modify) import Control.Monad.Reader(ReaderT(..)) import Control.Monad.State.Class import Data.Typeable (Typeable, typeOf) -import Control.Applicative((<$>)) +import Control.Applicative((<$>), Applicative) -- $usage -- -- This module allow to store state data with some 'Window'. @@ -54,7 +54,7 @@ import Control.Applicative((<$>)) -- window. newtype StateQuery s a = StateQuery { getQuery :: Query a - } deriving (Monad, MonadIO, Functor) + } deriving (Monad, MonadIO, Applicative, Functor) packIntoQuery :: (Window -> X a) -> Query a packIntoQuery = Query . ReaderT |