diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-10-17 09:30:31 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-10-17 09:30:31 +0200 |
commit | bb88dbe078a0f16c0626a2825fd9f4d6bc775875 (patch) | |
tree | 71fbc7323fe188829b9b327af022bd85cc154d4e | |
parent | 0d7cb474e6eb9a8bb5b6c9b1adf09b3b29760ff1 (diff) |
applySort -> applySorts
-rw-r--r-- | app/History.hs | 4 | ||||
-rw-r--r-- | app/Issue/Sort.hs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/History.hs b/app/History.hs index d2e6a46..fee1f2e 100644 --- a/app/History.hs +++ b/app/History.hs @@ -13,7 +13,7 @@ import GHC.Generics (Generic) import Git qualified import Issue (Issue (..), fromMatch, id) import Issue.Filter (Filter, applyFilters) -import Issue.Sort (Sort, applySort) +import Issue.Sort (Sort, applySorts) import Issue.Tag qualified as I import Parallel (parMapM) import Process (proc, sh) @@ -55,7 +55,7 @@ listIssues sort filters paths = do let eventses = getEvents hashFirst issuesInitial (commitInfos ++ [commitInfoWorkingTree]) let issues = mapMaybe issueFromIssueEvents eventses issuesFiltered = applyFilters filters issues - issuesSorted = applySort sort issuesFiltered + issuesSorted = applySorts sort issuesFiltered issuesWithinPaths = case paths of [] -> diff --git a/app/Issue/Sort.hs b/app/Issue/Sort.hs index 2195244..46f4a19 100644 --- a/app/Issue/Sort.hs +++ b/app/Issue/Sort.hs @@ -2,7 +2,7 @@ module Issue.Sort ( Sort, Order, SortBy, - applySort, + applySorts, sortArg, ) where @@ -48,8 +48,8 @@ sortArg = | "-@" `T.isPrefixOf` s = Just (Sort Desc (SortByTag (T.drop 2 s))) | otherwise = Nothing -applySort :: [Sort] -> [Issue] -> [Issue] -applySort cs = compose (defaultSort : cs) +applySorts :: [Sort] -> [Issue] -> [Issue] +applySorts cs = compose (defaultSort : cs) where compose :: [Sort] -> ([Issue] -> [Issue]) compose = foldr (.) id . map toSort |