[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:01:37 UTC 2010


The following commit has been merged in the master branch:
commit 275a77ebf9f18f424231f62086eae565bb1aab99
Author: John Goerzen <jgoerzen at complete.org>
Date:   Mon Aug 15 20:26:04 2005 +0100

    Fixing up use of unsafeInterleaveIO

diff --git a/MissingH/IO/HVFS/Utils.hs b/MissingH/IO/HVFS/Utils.hs
index 06df95e..e9d223a 100644
--- a/MissingH/IO/HVFS/Utils.hs
+++ b/MissingH/IO/HVFS/Utils.hs
@@ -71,14 +71,14 @@ yourself later.
 -}
 
 recurseDirStat :: HVFS a => a -> FilePath -> IO [(FilePath, HVFSStatEncap)]
-recurseDirStat h fn = unsafeInterleaveIO $
+recurseDirStat h fn = 
     do fs <- vGetSymbolicLinkStatus h fn
        if withStat fs vIsDirectory 
           then do
                dirc <- vGetDirectoryContents h fn
                let contents = map ((++) (fn ++ "/")) $ 
                               filter (\x -> x /= "." && x /= "..") dirc
-               subdirs <- mapM (recurseDirStat h) contents
+               subdirs <- unsafeInterleaveIO $ mapM (recurseDirStat h) contents
                return $ (concat subdirs) ++ [(fn, fs)]
           else return [(fn, fs)]
 
@@ -89,8 +89,9 @@ recursiveRemove :: HVFS a => a -> FilePath -> IO ()
 recursiveRemove h fn =
     let worker [] = return ()
         worker ((fn, fs):xs) =
-            do if withStat fs vIsDirectory then
-                  vRemoveDirectory h fn
+            do --putStrLn $ "worker " ++ fn
+               if withStat fs vIsDirectory 
+                  then vRemoveDirectory h fn
                   else vRemoveFile h fn
                worker xs
         in

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list