hslint
This commit is contained in:
parent
e3f1568e0f
commit
d64132a43a
16 changed files with 25 additions and 29 deletions
|
@ -99,7 +99,7 @@ bandwidthUnits = error "stop trying to rip people off"
|
|||
|
||||
{- Do you yearn for the days when men were men and megabytes were megabytes? -}
|
||||
oldSchoolUnits :: [Unit]
|
||||
oldSchoolUnits = map mingle $ zip storageUnits memoryUnits
|
||||
oldSchoolUnits = zipWith (curry mingle) storageUnits memoryUnits
|
||||
where
|
||||
mingle (Unit _ a n, Unit s' _ _) = Unit s' a n
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import System.IO.Error
|
|||
import System.Posix.Files
|
||||
import System.Directory
|
||||
import Control.Exception (throw)
|
||||
import Control.Monad
|
||||
|
||||
import Utility.SafeCommand
|
||||
import Utility.Conditional
|
||||
|
@ -37,13 +38,11 @@ moveFile src dest = try (rename src dest) >>= onrename
|
|||
mv tmp _ = do
|
||||
ok <- boolSystem "mv" [Param "-f",
|
||||
Param src, Param tmp]
|
||||
if ok
|
||||
then return ()
|
||||
else do
|
||||
-- delete any partial
|
||||
_ <- try $
|
||||
removeFile tmp
|
||||
rethrow
|
||||
unless ok $ do
|
||||
-- delete any partial
|
||||
_ <- try $
|
||||
removeFile tmp
|
||||
rethrow
|
||||
isdir f = do
|
||||
r <- try (getFileStatus f)
|
||||
case r of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue