From c51033b6c5a33df31f3bd23a65e688060308e28d Mon Sep 17 00:00:00 2001 From: Daisuke Fujimura Date: Tue, 4 Jul 2023 16:50:18 +0900 Subject: [PATCH] Improve readability --- src/Git/Freq.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Git/Freq.hs b/src/Git/Freq.hs index 43b923d..7be89df 100644 --- a/src/Git/Freq.hs +++ b/src/Git/Freq.hs @@ -47,10 +47,10 @@ parse bs = case Parser.parseByteString numstat mempty bs of Parser.Failure doc -> error $ show doc update :: Result -> NumStat -> Result -update result (fileName,delta,newFileName) = +update result (fileName,delta,mNewFileName) = let result' = Map.alter (incr Changes { delta = delta, commits = 1 }) fileName result in - case newFileName of - Just f' -> swap fileName f' result' + case mNewFileName of + Just newFileName -> swap fileName newFileName result' Nothing -> result' incr :: Changes -> Maybe Changes -> Maybe Changes