xmonad-contrib-0.18.1: Community-maintained extensions for xmonad

Copyright | (c) 2007 Andrea Rossato David Roundy
License | BSD-style (see xmonad/LICENSE)
Maintainer | andrea.rossato@unibz.it
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

XMonad.Util.Invisible

Contents

- Usage:

Description

A data type to store the layout state

Synopsis

- newtype Invisible (m :: Type -> Type) a = I (m a)
- whenIJust :: Monad m => Invisible Maybe a -> (a -> m ()) -> m ()
- fromIMaybe :: a -> Invisible Maybe a -> a

# 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 :: Type -> Type) a Source #

Constructors

I (m a) |

#### Instances

Instances details

Applicative m => Applicative (Invisible m) Source # |
Instance details Defined in XMonad.Util.Invisible Methods pure :: a -> Invisible m a Source # (<*>) :: Invisible m (a -> b) -> Invisible m a -> Invisible m b Source # liftA2 :: (a -> b -> c) -> Invisible m a -> Invisible m b -> Invisible m c Source # (*>) :: Invisible m a -> Invisible m b -> Invisible m b Source # (<*) :: Invisible m a -> Invisible m b -> Invisible m a Source #
Functor m => Functor (Invisible m) Source # |
Instance details Defined in XMonad.Util.Invisible Methods fmap :: (a -> b) -> Invisible m a -> Invisible m b Source # (<$) :: a -> Invisible m b -> Invisible m a Source #
Monad m => Monad (Invisible m) Source # |
Instance details Defined in XMonad.Util.Invisible Methods (>>=) :: Invisible m a -> (a -> Invisible m b) -> Invisible m b Source # (>>) :: Invisible m a -> Invisible m b -> Invisible m b Source # return :: a -> Invisible m a Source #
MonadFail m => MonadFail (Invisible m) Source # |
Instance details Defined in XMonad.Util.Invisible Methods fail :: String -> Invisible m a Source #
(Functor m, Monad m, MonadFail m) => Read (Invisible m a) Source # |
Instance details Defined in XMonad.Util.Invisible Methods readsPrec :: Int -> ReadS (Invisible m a) Source # readList :: ReadS [Invisible m a] Source # readPrec :: ReadPrec (Invisible m a) Source # readListPrec :: ReadPrec [Invisible m a] Source #
Monad m => Show (Invisible m a) Source # |
Instance details Defined in XMonad.Util.Invisible Methods showsPrec :: Int -> Invisible m a -> ShowS Source # show :: Invisible m a -> String Source # showList :: [Invisible m a] -> ShowS Source #

whenIJust :: Monad m => Invisible Maybe a -> (a -> m ()) -> m () Source #

fromIMaybe :: a -> Invisible Maybe a -> a Source #