xmonad-contrib-0.13: Third party 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 | Haskell98

XMonad.Util.Invisible

Contents

- Usage:

Description

A data type to store the layout state

Synopsis

- newtype Invisible m 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 a Source #

Constructors

I (m a) |

Instances

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

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

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