[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:03:13 UTC 2010
The following commit has been merged in the master branch:
commit 057cc92d8fb4de027e1002d59e909664d8a01af7
Author: John Goerzen <jgoerzen at complete.org>
Date: Mon Oct 10 18:21:48 2005 +0100
Some compilation fixes
diff --git a/MissingH/IO/Binary.hs b/MissingH/IO/Binary.hs
index 700b04d..6f7d07a 100644
--- a/MissingH/IO/Binary.hs
+++ b/MissingH/IO/Binary.hs
@@ -287,9 +287,9 @@ readBinaryFile :: FilePath -> IO String
readBinaryFile = vReadBinaryFile SystemFS
{- | Same as 'readBinaryFile', but works with HVFS objects. -}
-vReadBinaryFile :: HVFS a => a -> FilePath -> IO String
+vReadBinaryFile :: (HVFSOpenable a) => a -> FilePath -> IO String
vReadBinaryFile fs fp =
- vOpenBinaryFile fs fp ReadMode >>= vGetContents
+ vOpenBinaryFile fs fp ReadMode >>= (\(HVFSOpenEncap h) -> vGetContents h)
{- | Like the built-in 'writeFile', but opens the file in binary instead
of text mode. -}
@@ -297,8 +297,9 @@ writeBinaryFile :: FilePath -> String -> IO ()
writeBinaryFile = vWriteBinaryFile SystemFS
{- | Like 'writeBinaryFile', but works on HVFS objects. -}
-vWriteBinaryFile :: HVFS a => a -> FilePath -> String -> IO ()
+vWriteBinaryFile :: (HVFSOpenable a) => a -> FilePath -> String -> IO ()
vWriteBinaryFile fs name str =
do h <- vOpenBinaryFile fs name WriteMode
- vPutStr h str
- vClose h
+ case h of
+ HVFSOpenEncap x -> do vPutStr x str
+ vClose x
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list