Skip to content

Commit

Permalink
Improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
fujimura committed Jul 4, 2023
1 parent 9238220 commit c51033b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Git/Freq.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c51033b

Please sign in to comment.