[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 15:06:52 UTC 2010
The following commit has been merged in the master branch:
commit 1131cf037070a3b7dd274705a76e46c32c441e42
Author: John Goerzen <jgoerzen at complete.org>
Date: Thu Dec 29 00:27:10 2005 +0100
Applied suggestion to make recursiveRemove cleaner from Bulat
diff --git a/MissingH/IO/HVFS/Utils.hs b/MissingH/IO/HVFS/Utils.hs
index 6fa0280..f8e8444 100644
--- a/MissingH/IO/HVFS/Utils.hs
+++ b/MissingH/IO/HVFS/Utils.hs
@@ -93,15 +93,10 @@ child files\/directories.
-}
recursiveRemove :: HVFS a => a -> FilePath -> IO ()
recursiveRemove h fn =
- let worker [] = return ()
- worker ((fn, fs):xs) =
- do --putStrLn $ "worker " ++ fn
- if withStat fs vIsDirectory
- then vRemoveDirectory h fn
- else vRemoveFile h fn
- worker xs
- in
- recurseDirStat h fn >>= worker
+ recurseDirStat h fn >>= mapM_ $
+ \(fn, fs) -> if withStat fs vIsDirectory
+ then vRemoveDirectory h fn
+ else vRemoveFile h fn
{- | Provide a result similar to the command ls -l over a directory.
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list