summaryrefslogtreecommitdiff
path: root/Utility/InodeCache.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-08-11 14:57:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-08-11 17:25:31 -0400
commit1f7645eb01d4a459b4dd61d8fdc156e94401bede (patch)
treee47d744e5b4ed6ad2bab763406487585eeb9745b /Utility/InodeCache.hs
parentcff31d1a657ebcba5916be97cf7b9918210426a6 (diff)
fix build on windows with unix-compat-0.4.1.3
FileID type changed, needs Arbitrary instance. On the plus side, getFileStatus on Windows now actually gets file id's, not always 0, so direct mode is safer there now.
Diffstat (limited to 'Utility/InodeCache.hs')
-rw-r--r--Utility/InodeCache.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Utility/InodeCache.hs b/Utility/InodeCache.hs
index b3534487d..91359457a 100644
--- a/Utility/InodeCache.hs
+++ b/Utility/InodeCache.hs
@@ -40,6 +40,10 @@ import Common
import System.PosixCompat.Types
import Utility.QuickCheck
+#ifdef mingw32_HOST_OS
+import Data.Word (Word64)
+#endif
+
data InodeCachePrim = InodeCachePrim FileID FileOffset EpochTime
deriving (Show, Eq, Ord)
@@ -204,6 +208,11 @@ instance Arbitrary InodeCache where
<*> arbitrary
in InodeCache <$> prim
+#ifdef mingw32_HOST_OS
+instance Arbitrary FileID where
+ arbitrary = fromIntegral <$> (arbitrary :: Gen Word64)
+#endif
+
prop_read_show_inodecache :: InodeCache -> Bool
prop_read_show_inodecache c = case readInodeCache (showInodeCache c) of
Nothing -> False