[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 14:59:57 UTC 2010
The following commit has been merged in the master branch:
commit 45bd5a0e13ed6091546e872d0107622d6e20ca09
Author: John Goerzen <jgoerzen at complete.org>
Date: Fri Jul 22 20:38:16 2005 +0100
Some more windows compatibility updates
diff --git a/MissingH/IO/StatCompat.hs b/MissingH/IO/StatCompat.hs
index a3106cc..38e7b83 100644
--- a/MissingH/IO/StatCompat.hs
+++ b/MissingH/IO/StatCompat.hs
@@ -33,15 +33,13 @@ useful with HVFS and on Windows. See also "MissingH.IO.WindowsCompat".
Copyright (c) 2005 John Goerzen, jgoerzen\@complete.org
-}
-module MissingH.IO.StatCompat(
- FileStatusCompat
- )
+module MissingH.IO.StatCompat
where
import System.Posix.Types
+import Data.Bits
#ifdef mingw32_HOST_OS
type LinkCount = Int
-type LinkCount = Int
type UserID = Int
type GroupID = Int
@@ -93,9 +91,9 @@ sc_helper comp stat =
isBlockDevice = sc_helper blockSpecialMode
isCharacterDevice = sc_helper characterSpecialMode
isNamedPipe = sc_helper namedPipeMode
-isRegularFile = sc_helper regularPipeMode
+isRegularFile = sc_helper regularFileMode
isDirectory = sc_helper directoryMode
isSymbolicLink = sc_helper symbolicLinkMode
isSocket = sc_helper socketMode
-
\ No newline at end of file
+
diff --git a/MissingH/IO/WindowsCompat.hs b/MissingH/IO/WindowsCompat.hs
index c324f4e..600cba5 100644
--- a/MissingH/IO/WindowsCompat.hs
+++ b/MissingH/IO/WindowsCompat.hs
@@ -39,12 +39,14 @@ Copyright (c) 2005 John Goerzen, jgoerzen\@complete.org
module MissingH.IO.WindowsCompat
where
+#ifdef mingw32_HOST_OS
+
import System.Posix.Types
import Data.Bits
import MissingH.IO.StatCompat
import MissingH.Time
+import System.Directory
-#ifdef mingw32_HOST_OS
-- these types aren't defined here
nullFileMode :: FileMode
@@ -105,7 +107,7 @@ type FileStatus = FileStatusCompat
getFileStatus :: FilePath -> IO FileStatus
getFileStatus fp =
do isfile <- doesFileExist fp
- isdir <- doesDirectoryExist
+ isdir <- doesDirectoryExist fp
perms <- getPermissions fp
modct <- getModificationTime fp
epochtime <- timelocal modct
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list