XMonad

xmonad-0.13: A tiling window manager

Copyright | (c) Don Stewart
License | BSD3
Maintainer | Don Stewart <dons@galois.com>
Stability | provisional
Portability |
Safe Haskell | None
Language | Haskell98

XMonad

Description

Synopsis

- module XMonad.Main
- module XMonad.Core
- module XMonad.Config
- module XMonad.Layout
- module XMonad.ManageHook
- module XMonad.Operations
- module Graphics.X11
- module Graphics.X11.Xlib.Extras
- (.|.) :: Bits a => a -> a -> a
- class Monad m => MonadState s (m :: * -> *) | m -> s where
- gets :: MonadState s m => (s -> a) -> m a
- modify :: MonadState s m => (s -> s) -> m ()
- class Monad m => MonadReader r (m :: * -> *) | m -> r where
- asks :: MonadReader r m => (r -> a) -> m a
- class Monad m => MonadIO (m :: * -> *) where

# Documentation

module XMonad.Main

module XMonad.Core

module XMonad.Config

module XMonad.Layout

module XMonad.ManageHook

module XMonad.Operations

module Graphics.X11

module Graphics.X11.Xlib.Extras

(.|.) :: Bits a => a -> a -> a infixl 5 #

Bitwise "or"

class Monad m => MonadState s (m :: * -> *) | m -> s where #

Minimal definition is either both of `get` and `put` or just `state`

Minimal complete definition

state | get, put

Methods

get :: m s #

Return the state from the internals of the monad.

put :: s -> m () #

Replace the state inside the monad.

state :: (s -> (a, s)) -> m a #

Embed a simple state action into the monad.

Instances

MonadState XState X # |
Methods get :: X XState # put :: XState -> X () # state :: (XState -> (a, XState)) -> X a #
MonadState s m => MonadState s (MaybeT m) |
Methods get :: MaybeT m s # put :: s -> MaybeT m () # state :: (s -> (a, s)) -> MaybeT m a #
MonadState s m => MonadState s (ListT m) |
Methods get :: ListT m s # put :: s -> ListT m () # state :: (s -> (a, s)) -> ListT m a #
Monad m => MonadState s (StateT s m) |
Methods get :: StateT s m s # put :: s -> StateT s m () # state :: (s -> (a, s)) -> StateT s m a #
(Monoid w, MonadState s m) => MonadState s (WriterT w m) |
Methods get :: WriterT w m s # put :: s -> WriterT w m () # state :: (s -> (a, s)) -> WriterT w m a #
(Monoid w, MonadState s m) => MonadState s (WriterT w m) |
Methods get :: WriterT w m s # put :: s -> WriterT w m () # state :: (s -> (a, s)) -> WriterT w m a #
Monad m => MonadState s (StateT s m) |
Methods get :: StateT s m s # put :: s -> StateT s m () # state :: (s -> (a, s)) -> StateT s m a #
MonadState s m => MonadState s (IdentityT * m) |
Methods get :: IdentityT * m s # put :: s -> IdentityT * m () # state :: (s -> (a, s)) -> IdentityT * m a #
MonadState s m => MonadState s (ExceptT e m) |
Methods get :: ExceptT e m s # put :: s -> ExceptT e m () # state :: (s -> (a, s)) -> ExceptT e m a #
(Error e, MonadState s m) => MonadState s (ErrorT e m) |
Methods get :: ErrorT e m s # put :: s -> ErrorT e m () # state :: (s -> (a, s)) -> ErrorT e m a #
MonadState s m => MonadState s (ReaderT * r m) |
Methods get :: ReaderT * r m s # put :: s -> ReaderT * r m () # state :: (s -> (a, s)) -> ReaderT * r m a #
MonadState s m => MonadState s (ContT * r m) |
Methods get :: ContT * r m s # put :: s -> ContT * r m () # state :: (s -> (a, s)) -> ContT * r m a #
(Monad m, Monoid w) => MonadState s (RWST r w s m) |
Methods get :: RWST r w s m s # put :: s -> RWST r w s m () # state :: (s -> (a, s)) -> RWST r w s m a #
(Monad m, Monoid w) => MonadState s (RWST r w s m) |
Methods get :: RWST r w s m s # put :: s -> RWST r w s m () # state :: (s -> (a, s)) -> RWST r w s m a #

gets :: MonadState s m => (s -> a) -> m a #

Gets specific component of the state, using a projection function supplied.

modify :: MonadState s m => (s -> s) -> m () #

Monadic state transformer.

Maps an old state to a new state inside a state monad. The old state is thrown away.

         Main> :t modify ((+1) :: Int -> Int)
         modify (...) :: (MonadState Int a) => a ()

This says that `modify (+1)` acts over any Monad that is a member of the `MonadState` class, with an `Int` state.

class Monad m => MonadReader r (m :: * -> *) | m -> r where #

See examples in Control.Monad.Reader. Note, the partially applied function type `(->) r` is a simple reader monad. See the `instance` declaration below.

Minimal complete definition

(ask | reader), local

Methods

ask :: m r #

Retrieves the monad environment.

local #

Arguments

:: (r -> r) | The function to modify the environment.
-> m a | `Reader` to run in the modified environment.
-> m a |

Executes a computation in a modified environment.

reader #

Arguments

:: (r -> a) | The selector function to apply to the environment.
-> m a |

Retrieves a function of the current environment.

Instances

MonadReader Window Query # |
Methods ask :: Query Window # local :: (Window -> Window) -> Query a -> Query a # reader :: (Window -> a) -> Query a #
MonadReader XConf X # |
Methods ask :: X XConf # local :: (XConf -> XConf) -> X a -> X a # reader :: (XConf -> a) -> X a #
MonadReader r m => MonadReader r (MaybeT m) |
Methods ask :: MaybeT m r # local :: (r -> r) -> MaybeT m a -> MaybeT m a # reader :: (r -> a) -> MaybeT m a #
MonadReader r m => MonadReader r (ListT m) |
Methods ask :: ListT m r # local :: (r -> r) -> ListT m a -> ListT m a # reader :: (r -> a) -> ListT m a #
(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) |
Methods ask :: WriterT w m r # local :: (r -> r) -> WriterT w m a -> WriterT w m a # reader :: (r -> a) -> WriterT w m a #
(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) |
Methods ask :: WriterT w m r # local :: (r -> r) -> WriterT w m a -> WriterT w m a # reader :: (r -> a) -> WriterT w m a #
MonadReader r m => MonadReader r (StateT s m) |
Methods ask :: StateT s m r # local :: (r -> r) -> StateT s m a -> StateT s m a # reader :: (r -> a) -> StateT s m a #
MonadReader r m => MonadReader r (StateT s m) |
Methods ask :: StateT s m r # local :: (r -> r) -> StateT s m a -> StateT s m a # reader :: (r -> a) -> StateT s m a #
MonadReader r m => MonadReader r (IdentityT * m) |
Methods ask :: IdentityT * m r # local :: (r -> r) -> IdentityT * m a -> IdentityT * m a # reader :: (r -> a) -> IdentityT * m a #
MonadReader r m => MonadReader r (ExceptT e m) |
Methods ask :: ExceptT e m r # local :: (r -> r) -> ExceptT e m a -> ExceptT e m a # reader :: (r -> a) -> ExceptT e m a #
(Error e, MonadReader r m) => MonadReader r (ErrorT e m) |
Methods ask :: ErrorT e m r # local :: (r -> r) -> ErrorT e m a -> ErrorT e m a # reader :: (r -> a) -> ErrorT e m a #
Monad m => MonadReader r (ReaderT * r m) |
Methods ask :: ReaderT * r m r # local :: (r -> r) -> ReaderT * r m a -> ReaderT * r m a # reader :: (r -> a) -> ReaderT * r m a #
MonadReader r ((->) LiftedRep LiftedRep r) |
Methods ask :: (LiftedRep -> LiftedRep) r r # local :: (r -> r) -> (LiftedRep -> LiftedRep) r a -> (LiftedRep -> LiftedRep) r a # reader :: (r -> a) -> (LiftedRep -> LiftedRep) r a #
MonadReader r' m => MonadReader r' (ContT * r m) |
Methods ask :: ContT * r m r' # local :: (r' -> r') -> ContT * r m a -> ContT * r m a # reader :: (r' -> a) -> ContT * r m a #
(Monad m, Monoid w) => MonadReader r (RWST r w s m) |
Methods ask :: RWST r w s m r # local :: (r -> r) -> RWST r w s m a -> RWST r w s m a # reader :: (r -> a) -> RWST r w s m a #
(Monad m, Monoid w) => MonadReader r (RWST r w s m) |
Methods ask :: RWST r w s m r # local :: (r -> r) -> RWST r w s m a -> RWST r w s m a # reader :: (r -> a) -> RWST r w s m a #

asks #

Arguments

:: MonadReader r m |
=> (r -> a) | The selector function to apply to the environment.
-> m a |

Retrieves a function of the current environment.

class Monad m => MonadIO (m :: * -> *) where #

Monads in which `IO` computations may be embedded. Any monad built by applying a sequence of monad transformers to the `IO` monad will be an instance of this class.

Instances should satisfy the following laws, which state that `liftIO` is a transformer of monads:

-     liftIO . return = return

-     liftIO (m >>= f) = liftIO m >>= (liftIO . f)

Minimal complete definition

liftIO

Methods

liftIO :: IO a -> m a #

Lift a computation from the `IO` monad.

Instances

MonadIO IO | Since: 4.9.0.0
Methods liftIO :: IO a -> IO a #
MonadIO Query # |
Methods liftIO :: IO a -> Query a #
MonadIO X # |
Methods liftIO :: IO a -> X a #
(Error e, MonadIO m) => MonadIO (ErrorT e m) |
Methods liftIO :: IO a -> ErrorT e m a #
MonadIO m => MonadIO (StateT s m) |
Methods liftIO :: IO a -> StateT s m a #
MonadIO m => MonadIO (ReaderT * r m) |
Methods liftIO :: IO a -> ReaderT * r m a #