From 640b016cf9e7ad26eec259e8547dd0258686fb5b Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 25 Nov 2016 18:38:32 -0800 Subject: [PATCH] [XMonad] Add if' and ifL to fix window bringer stuff --- dotfiles/xmonad/xmonad.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 56a4c5ad..aebd560d 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -80,6 +80,13 @@ tee = (fmap . fmap . fmap) (fmap fst) fork findM :: (Monad m) => (a -> m (Maybe b)) -> [a] -> m (Maybe b) findM f = runMaybeT . msum . map (MaybeT . f) + +if' :: Bool -> a -> a -> a +if' True x _ = x +if' False _ y = y + +ifL :: a -> a -> Bool -> a +ifL a b c = if' c a b -- Selectors