This commit is contained in:
Joey Hess 2014-04-26 19:25:05 -04:00
parent f5b1c3841e
commit 72ec0ab736
12 changed files with 18 additions and 17 deletions

View file

@ -59,7 +59,7 @@ parseDuration = Duration <$$> go 0
fromDuration :: Duration -> String
fromDuration Duration { durationSeconds = d }
| d == 0 = "0s"
| otherwise = concat $ map showunit $ go [] units d
| otherwise = concatMap showunit $ go [] units d
where
showunit (u, n)
| n > 0 = show n ++ [u]