Apply hlint hints

All hints are applied in one single commit, as a commit per hint would
result in 80+ separate commits—tihs is really just too much noise.

Related: https://github.com/xmonad/xmonad-contrib/issues/537
This commit is contained in:
slotThe
2021-06-06 16:11:17 +02:00
parent b96899afb6
commit bd5b969d9b
222 changed files with 1119 additions and 1193 deletions

View File

@@ -25,7 +25,6 @@ module XMonad.Prompt.Unicode (
) where
import qualified Data.ByteString.Char8 as BS
import Data.Ord
import Numeric
import System.IO
import System.IO.Error
@@ -81,7 +80,7 @@ populateEntries unicodeDataFilename = do
hPutStrLn stderr "Do you have unicode-data installed?"
return False
Right dat -> do
XS.put . UnicodeData . sortBy (comparing (BS.length . snd)) $ parseUnicodeData dat
XS.put . UnicodeData . sortOn (BS.length . snd) $ parseUnicodeData dat
return True
else return True
@@ -97,7 +96,7 @@ type Predicate = String -> String -> Bool
searchUnicode :: [(Char, BS.ByteString)] -> Predicate -> String -> [(Char, String)]
searchUnicode entries p s = map (second BS.unpack) $ filter go entries
where w = filter (all isAscii) . filter ((> 1) . length) . words $ map toUpper s
go (_, d) = all (`p` (BS.unpack d)) w
go (_, d) = all (`p` BS.unpack d) w
mkUnicodePrompt :: String -> [String] -> String -> XPConfig -> X ()
mkUnicodePrompt prog args unicodeDataFilename xpCfg =