mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-04 22:21:54 -07:00
Removed fromIMaybe from Tabbed ad added it to Invisible
This commit is contained in:
@@ -17,6 +17,7 @@ module XMonadContrib.Invisible (
|
|||||||
-- $usage
|
-- $usage
|
||||||
Invisible (..)
|
Invisible (..)
|
||||||
, whenIJust
|
, whenIJust
|
||||||
|
, fromIMaybe
|
||||||
) where
|
) where
|
||||||
|
|
||||||
-- $usage
|
-- $usage
|
||||||
@@ -41,3 +42,7 @@ instance (Functor m, Monad m) => Functor (Invisible m) where
|
|||||||
whenIJust :: (Monad m) => Invisible Maybe a -> (a -> m ()) -> m ()
|
whenIJust :: (Monad m) => Invisible Maybe a -> (a -> m ()) -> m ()
|
||||||
whenIJust (I (Just x)) f = f x
|
whenIJust (I (Just x)) f = f x
|
||||||
whenIJust (I Nothing) _ = return ()
|
whenIJust (I Nothing) _ = return ()
|
||||||
|
|
||||||
|
fromIMaybe :: a -> Invisible Maybe a -> a
|
||||||
|
fromIMaybe _ (I (Just x)) = x
|
||||||
|
fromIMaybe a (I Nothing) = a
|
||||||
|
@@ -206,7 +206,3 @@ shrinkWhile sh p x = sw $ sh x
|
|||||||
shrinkText :: Shrinker
|
shrinkText :: Shrinker
|
||||||
shrinkText "" = [""]
|
shrinkText "" = [""]
|
||||||
shrinkText cs = cs : shrinkText (init cs)
|
shrinkText cs = cs : shrinkText (init cs)
|
||||||
|
|
||||||
fromIMaybe :: a -> Invisible Maybe a -> a
|
|
||||||
fromIMaybe _ (I (Just x)) = x
|
|
||||||
fromIMaybe a (I Nothing) = a
|
|
||||||
|
Reference in New Issue
Block a user