diff options
author | jao <jao@gnu.org> | 2018-06-24 01:54:28 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2018-06-24 01:54:28 +0100 |
commit | 741b803b943430a262ec36658b13830733e17b48 (patch) | |
tree | da40a2aa66691e494e4c22cba24eb5d1dc0b71e7 | |
parent | 9c5f9b26bc19975f2486a11941821089ee62562a (diff) | |
download | xmobar-741b803b943430a262ec36658b13830733e17b48.tar.gz xmobar-741b803b943430a262ec36658b13830733e17b48.tar.bz2 |
hlinting
-rw-r--r-- | .hlint.yaml | 2 | ||||
-rw-r--r-- | src/Plugins/BufferedPipeReader.hs | 2 | ||||
-rw-r--r-- | src/Plugins/EWMH.hs | 6 | ||||
-rw-r--r-- | src/Xmobar.hs | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/.hlint.yaml b/.hlint.yaml index b68de82..aca5666 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -12,7 +12,7 @@ - ignore: {name: "Use <$>"} - ignore: {name: "Use uncurry"} - ignore: {name: "Reduce duplication"} - +- ignore: {name: "Use sortOn"} # Specify additional command line arguments # diff --git a/src/Plugins/BufferedPipeReader.hs b/src/Plugins/BufferedPipeReader.hs index eeb330b..fb7d269 100644 --- a/src/Plugins/BufferedPipeReader.hs +++ b/src/Plugins/BufferedPipeReader.hs @@ -84,4 +84,4 @@ instance Exec BufferedPipeReader where threadDelay ( to * 100 * 1000 ) readTVarIO tb >>= \b -> when b $ do when tg $ putMVar signal $ Hide 0 - atomically (readTVar ts) >>= maybe (return ()) cb + readTVarIO ts >>= maybe (return ()) cb diff --git a/src/Plugins/EWMH.hs b/src/Plugins/EWMH.hs index 63395f0..1aac83d 100644 --- a/src/Plugins/EWMH.hs +++ b/src/Plugins/EWMH.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -w #-} -{-# LANGUAGE CPP, NamedFieldPuns, GeneralizedNewtypeDeriving, FlexibleContexts #-} - +{-# LANGUAGE CPP, NamedFieldPuns, GeneralizedNewtypeDeriving #-} +{-# LANGUAGE TupleSections, FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- Module : Plugins.EWMH @@ -224,7 +224,7 @@ updateClientList _ = do case mwp of Just xs -> do cl <- gets clients - let cl' = Map.fromList $ map (flip (,) initialClient . fromIntegral) xs + let cl' = Map.fromList $ map ((, initialClient) . fromIntegral) xs dels = Map.difference cl cl' new = Map.difference cl' cl modify (\s -> s { clients = Map.union (Map.intersection cl cl') cl'}) diff --git a/src/Xmobar.hs b/src/Xmobar.hs index c6e16a6..9c6c2c6 100644 --- a/src/Xmobar.hs +++ b/src/Xmobar.hs @@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- -- | -- Module : Xmobar --- Copyright : (c) 2011, 2012, 2013, 2014, 2015, 2017 Jose Antonio Ortega Ruiz +-- Copyright : (c) 2011, 2012, 2013, 2014, 2015, 2017, 2018 Jose Antonio Ortega Ruiz -- (c) 2007 Andrea Rossato -- License : BSD-style (see LICENSE) -- @@ -245,7 +245,7 @@ startCommand sig (com,s,ss) updateString :: Config -> TVar [String] -> IO [[(Widget, String, Int, Maybe [Action])]] updateString conf v = do - s <- atomically $ readTVar v + s <- readTVarIO v let l:c:r:_ = s ++ repeat "" io $ mapM (parseString conf) [l, c, r] |