[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:55:54 UTC 2010
The following commit has been merged in the master branch:
commit 0c895509f0ea7c3c0eaa441a80bd29a46094ade6
Author: John Goerzen <jgoerzen at complete.org>
Date: Wed Apr 6 00:06:18 2005 +0100
New readBinaryFile, writeBinaryFile
Keywords:
(jgoerzen at complete.org--projects/missingh--head--0.7--patch-215)
diff --git a/ChangeLog b/ChangeLog
index a317fc8..e358a6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
# arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
#
+2005-04-05 18:06:18 GMT John Goerzen <jgoerzen at complete.org> patch-215
+
+ Summary:
+ New readBinaryFile, writeBinaryFile
+ Revision:
+ missingh--head--0.7--patch-215
+
+
+ modified files:
+ ChangeLog MissingH/IO/Binary.hs debian/changelog
+
+
2005-04-05 17:57:44 GMT John Goerzen <jgoerzen at complete.org> patch-214
Summary:
diff --git a/MissingH/IO/Binary.hs b/MissingH/IO/Binary.hs
index 1daef06..c34e691 100644
--- a/MissingH/IO/Binary.hs
+++ b/MissingH/IO/Binary.hs
@@ -1,5 +1,5 @@
{- arch-tag: I/O utilities, binary tools
-Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
+Copyright (C) 2004-2005 John Goerzen <jgoerzen at complete.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
{- |
Module : MissingH.IO.Binary
- Copyright : Copyright (C) 2004 John Goerzen
+ Copyright : Copyright (C) 2004-2005 John Goerzen
License : GNU GPL, version 2 or above
Maintainer : John Goerzen,
@@ -59,6 +59,7 @@ module MissingH.IO.Binary(-- * Entire File\/Handle Utilities
-- * Binary Multi-Block I\/O
hGetBlocks, getBlocks, hFullGetBlocks, fullGetBlocks,
-- * Lazy Interaction
+ readBinaryFile, writeBinaryFile,
-- ** Binary Block-based
hBlockInteract, blockInteract,
hFullBlockInteract, fullBlockInteract
@@ -226,3 +227,15 @@ copyFileBlocksToFile bs infn outfn = do
hClose hout
return ()
+{- | Like the built-in 'readFile', but opens the file in binary instead
+of text mode. -}
+readBinaryFile :: FilePath -> IO String
+readBinaryFile name = openBinaryFile name ReadMode >>= hGetContents
+
+{- | Like the built-in 'writeFile', but opens the file in binary instead
+of text mode. -}
+writeBinaryFile :: FilePath -> String -> IO ()
+writeBinaryFile name str =
+ do h <- openBinaryFile name WriteMode
+ hPutStr h str
+ hClose h
diff --git a/debian/changelog b/debian/changelog
index 8f5d504..5c9ae2a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,13 @@
missingh (0.9.2) unstable; urgency=low
+ * Compatibility with new Hugs and GHC releases.
* New modules: MissingH.Debian, MissingH.Debian.ControlParser
* New MissingH.List functions: wholeMap, fixedWidth
* New function: MissingH.Time.epochToClockTime
* Updated HVFS utilities to use epochToClockTime for compatibility
with the newer Hugs
+ * New features in MissingH.IO.Binary: readBinaryFile, writeBinaryFile.
+ Make sure tests use these features where appropriate.
-- John Goerzen <jgoerzen at complete.org> Tue, 15 Mar 2005 09:18:10 -0600
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list