diff --git a/src/Unused/TermSearch.hs b/src/Unused/TermSearch.hs index 6841ad7..244a27d 100644 --- a/src/Unused/TermSearch.hs +++ b/src/Unused/TermSearch.hs @@ -9,13 +9,13 @@ search t = do results <- ag t return $ linesMap prefixTerm results where - prefixTerm = ((++) t) + prefixTerm = (++ t) linesMap :: (String -> String) -> String -> [String] linesMap f = filter empty . map f . lines where - empty = ((/=) 0) . length + empty = (/= 0) . length ag :: String -> IO String ag t = do diff --git a/src/Unused/Types.hs b/src/Unused/Types.hs index 20d9555..0f7fbb1 100644 --- a/src/Unused/Types.hs +++ b/src/Unused/Types.hs @@ -107,10 +107,10 @@ responseForPath s = filterVByPath . filterKVByPath where filterVByPath = Map.map (updateMatchesWith newMatches) - filterKVByPath = Map.filterWithKey (\_ a -> s `elem` allPaths a) + filterKVByPath = Map.filterWithKey (const $ \a -> s `elem` allPaths a) allPaths = fmap (fileNameGrouping . tmPath) . trMatches updateMatchesWith f tr = tr { trMatches = f tr } - newMatches = (filter (((==) s) . fileNameGrouping . tmPath) . trMatches) + newMatches = (filter ((== s) . fileNameGrouping . tmPath) . trMatches) fileNameGrouping :: String -> DirectoryPrefix fileNameGrouping = diff --git a/src/Unused/Util.hs b/src/Unused/Util.hs index 1b0e3f3..50e171f 100644 --- a/src/Unused/Util.hs +++ b/src/Unused/Util.hs @@ -8,5 +8,5 @@ groupBy :: Eq b => (a -> b) -> [a] -> [(b, [a])] groupBy f l = fmap (\t -> (t, byTerm t)) uniqueTerms where - byTerm t = filter (((==) t) . f) l + byTerm t = filter ((== t) . f) l uniqueTerms = nub $ fmap f l