From 7678c48122bb9bb7041b75ddc33061b93cbcdbb2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 19 Mar 2021 14:43:42 -0700 Subject: Hlint suggestion. --- src/Text/Pandoc/Readers/Txt2Tags.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Txt2Tags.hs b/src/Text/Pandoc/Readers/Txt2Tags.hs index f27a3fc2c..d355a4b55 100644 --- a/src/Text/Pandoc/Readers/Txt2Tags.hs +++ b/src/Text/Pandoc/Readers/Txt2Tags.hs @@ -56,12 +56,13 @@ getT2TMeta = do outp <- fromMaybe "" <$> P.getOutputFile curDate <- formatTime defaultTimeLocale "%F" <$> P.getZonedTime curMtime <- catchError - ((nonEmpty <$> mapM P.getModificationTime inps) >>= - \case + (mapM P.getModificationTime inps >>= + (\case Nothing -> formatTime defaultTimeLocale "%T" <$> P.getZonedTime Just ts -> return $ formatTime defaultTimeLocale "%T" $ maximum ts) + . nonEmpty) (const (return "")) return $ T2TMeta (T.pack curDate) (T.pack curMtime) (intercalate ", " inps) outp -- cgit v1.2.3