From ca8439b6787eb238d7b07544dfc728488f3c71b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Tue, 22 Sep 2020 23:40:00 +0200 Subject: lint --- TreeView.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'TreeView.hs') diff --git a/TreeView.hs b/TreeView.hs index 3cb8174..ecd25c8 100644 --- a/TreeView.hs +++ b/TreeView.hs @@ -93,7 +93,7 @@ xconvPart m p = where contents = case partContent p of ContentText t -> - map (xconvLine m p) $ zip [0..] (T.lines t) + zipWith (curry $ xconvLine m p) [0..] (T.lines t) ContentMultipart parts -> map (xconvPart m) parts ContentMsgRFC822 _ -> @@ -145,14 +145,14 @@ loadSubForest = \case . subForest $ xconvPart m mp' - TVSearchResult sr -> do + TVSearchResult sr -> Right . unloadPartsWithFilename . map unloadReadSubForests . fromMessageForest <$> notmuchShow (termFromSearchResult sr) - TVSearch s -> do + TVSearch s -> Right . subForest . fromSearchResults s @@ -180,9 +180,9 @@ unloadSubForest t = case rootLabel t of hasUnloadedSubForest :: Tree TreeView -> Bool hasUnloadedSubForest t = case rootLabel t of TVMessage _ -> - null $ filter (not . isTVMessage . rootLabel) $ subForest t + all (isTVMessage . rootLabel) $ subForest t TVMessagePart _ _ -> - null $ filter (not . isTVMessagePart . rootLabel) $ subForest t + all (isTVMessagePart . rootLabel) $ subForest t _ -> null $ subForest t -- cgit v1.2.3