diff options
author | Andrea Rossato <andrea.rossato@unibz.it> | 2007-09-30 20:19:12 +0200 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@unibz.it> | 2007-09-30 20:19:12 +0200 |
commit | fad4514781e0e321a651504fa514b37becf9e072 (patch) | |
tree | b832d806d66d8a6ffb88f047d7453f7bf0a16303 /Invisible.hs | |
parent | 695f96c7286824d887e1cc5aaaa5578a8ff8f3bc (diff) | |
download | XMonadContrib-fad4514781e0e321a651504fa514b37becf9e072.tar.gz XMonadContrib-fad4514781e0e321a651504fa514b37becf9e072.tar.xz XMonadContrib-fad4514781e0e321a651504fa514b37becf9e072.zip |
Removed fromIMaybe from Tabbed ad added it to Invisible
darcs-hash:20070930181912-32816-142656b555beb7701117f43c1e20837e2daeb589.gz
Diffstat (limited to 'Invisible.hs')
-rw-r--r-- | Invisible.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Invisible.hs b/Invisible.hs index 8a5295c..91659c5 100644 --- a/Invisible.hs +++ b/Invisible.hs @@ -17,6 +17,7 @@ module XMonadContrib.Invisible ( -- $usage Invisible (..) , whenIJust + , fromIMaybe ) where -- $usage @@ -41,3 +42,7 @@ instance (Functor m, Monad m) => Functor (Invisible m) where whenIJust :: (Monad m) => Invisible Maybe a -> (a -> m ()) -> m () whenIJust (I (Just x)) f = f x whenIJust (I Nothing) _ = return () + +fromIMaybe :: a -> Invisible Maybe a -> a +fromIMaybe _ (I (Just x)) = x +fromIMaybe a (I Nothing) = a |