diff options
author | Joey Hess <joey@kitenet.net> | 2011-07-15 12:47:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-07-15 12:47:14 -0400 |
commit | 6c396a256c93464d726c66a95132536941871ee8 (patch) | |
tree | 7f934c9eae22a9cfd3fb1672ebd7bf6870439c81 /Utility/DataUnits.hs | |
parent | 185f0b687081f47d059cc0503f4f6b671868f753 (diff) |
finished hlint pass
Diffstat (limited to 'Utility/DataUnits.hs')
-rw-r--r-- | Utility/DataUnits.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Utility/DataUnits.hs b/Utility/DataUnits.hs index 7af2eadaf..f2bc333ea 100644 --- a/Utility/DataUnits.hs +++ b/Utility/DataUnits.hs @@ -106,7 +106,7 @@ oldSchoolUnits = map mingle $ zip storageUnits memoryUnits {- approximate display of a particular number of bytes -} roughSize :: [Unit] -> Bool -> ByteSize -> String roughSize units abbrev i - | i < 0 = "-" ++ findUnit units' (negate i) + | i < 0 = '-' : findUnit units' (negate i) | otherwise = findUnit units' i where units' = reverse $ sort units -- largest first @@ -139,10 +139,10 @@ readSize :: [Unit] -> String -> Maybe ByteSize readSize units input | null parsednum = Nothing | null parsedunit = Nothing - | otherwise = Just $ round $ number * (fromIntegral multiplier) + | otherwise = Just $ round $ number * fromIntegral multiplier where (number, rest) = head parsednum - multiplier = head $ parsedunit + multiplier = head parsedunit unitname = takeWhile isAlpha $ dropWhile isSpace rest parsednum = reads input :: [(Double, String)] |