XMonad.Util.Invisible

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 #

Constructors

I (m a) |

#### Instances

Instances details

Applicative m => Applicative (Invisible m) # |
Instance details Defined in XMonad.Util.Invisible Methods pure :: a -> Invisible m a # (<*>) :: Invisible m (a -> b) -> Invisible m a -> Invisible m b # liftA2 :: (a -> b -> c) -> Invisible m a -> Invisible m b -> Invisible m c # (*>) :: Invisible m a -> Invisible m b -> Invisible m b # (<*) :: Invisible m a -> Invisible m b -> Invisible m a #
Functor m => Functor (Invisible m) # |
Instance details Defined in XMonad.Util.Invisible Methods fmap :: (a -> b) -> Invisible m a -> Invisible m b # (<$) :: a -> Invisible m b -> Invisible m a #
Monad m => Monad (Invisible m) # |
Instance details Defined in XMonad.Util.Invisible 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 #
MonadFail m => MonadFail (Invisible m) # |
Instance details Defined in XMonad.Util.Invisible Methods fail :: String -> Invisible m a #
(Functor m, Monad m, MonadFail m) => Read (Invisible m a) # |
Instance details Defined in XMonad.Util.Invisible 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) # |
Instance details Defined in XMonad.Util.Invisible 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 () #

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