XMonad

xmonad-0.11.1: 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
  - get :: m s
  - put :: s -> m ()
  - state :: (s -> (a, s)) -> m a
- gets :: MonadState s m => (s -> a) -> m a
- modify :: MonadState s m => (s -> s) -> m ()
- class Monad m => MonadReader r m | m -> r where
  - ask :: m r
  - local :: (r -> r) -> m a -> m a
  - reader :: (r -> a) -> m a
- asks :: MonadReader r m => (r -> a) -> m a
- class Monad m => MonadIO m where
  - liftIO :: IO a -> m a

# 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

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 |
MonadState s m => MonadState s (MaybeT m) |
MonadState s m => MonadState s (ListT m) |
MonadState s m => MonadState s (IdentityT m) |
(Monoid w, MonadState s m) => MonadState s (WriterT w m) |
(Monoid w, MonadState s m) => MonadState s (WriterT w m) |
Monad m => MonadState s (StateT s m) |
Monad m => MonadState s (StateT s m) |
MonadState s m => MonadState s (ReaderT r m) |
MonadState s m => MonadState s (ExceptT e m) |
(Error e, MonadState s m) => MonadState s (ErrorT e m) |
MonadState s m => MonadState s (ContT r m) |
(Monad m, Monoid w) => MonadState s (RWST r w s m) |
(Monad m, Monoid w) => MonadState s (RWST r w s m) |

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 |
MonadReader XConf X |
MonadReader r m => MonadReader r (MaybeT m) |
MonadReader r m => MonadReader r (ListT m) |
MonadReader r m => MonadReader r (IdentityT m) |
MonadReader r ((->) r) |
(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) |
(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) |
MonadReader r m => MonadReader r (StateT s m) |
MonadReader r m => MonadReader r (StateT s m) |
Monad m => MonadReader r (ReaderT r m) |
MonadReader r m => MonadReader r (ExceptT e m) |
(Error e, MonadReader r m) => MonadReader r (ErrorT e m) |
MonadReader r' m => MonadReader r' (ContT r m) |
(Monad m, Monoid w) => MonadReader r (RWST r w s m) |
(Monad m, Monoid w) => MonadReader r (RWST r w s m) |

asks

Arguments

:: forall (m :: * -> *). 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)

Methods

liftIO :: IO a -> m a

Lift a computation from the `IO` monad.

Instances

MonadIO IO |
MonadIO Query |
MonadIO X |
MonadIO m => MonadIO (ListT m) |
MonadIO m => MonadIO (MaybeT m) |
MonadIO m => MonadIO (IdentityT m) |
MonadIO m => MonadIO (ContT r m) |
MonadIO m => MonadIO (ReaderT r m) |
MonadIO m => MonadIO (StateT s m) |
MonadIO m => MonadIO (StateT s m) |
MonadIO m => MonadIO (ExceptT e m) |
(Error e, MonadIO m) => MonadIO (ErrorT e m) |
(Monoid w, MonadIO m) => MonadIO (WriterT w m) |
(Monoid w, MonadIO m) => MonadIO (WriterT w m) |
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) |
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) |