[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:54:41 UTC 2010


The following commit has been merged in the master branch:
commit 60aa5505ec71cf98f1459cd7eab3317420c089bc
Author: John Goerzen <jgoerzen at complete.org>
Date:   Wed Feb 2 06:00:11 2005 +0100

    Checkpointing
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.7--patch-186)

diff --git a/ChangeLog b/ChangeLog
index ca2c676..2ebcd77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,19 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2005-02-01 23:00:11 GMT	John Goerzen <jgoerzen at complete.org>	patch-186
+
+    Summary:
+      Checkpointing
+    Revision:
+      missingh--head--0.7--patch-186
+
+
+    modified files:
+     ChangeLog libsrc/MissingH/AnyDBM/StringDBM.hs
+     libsrc/MissingH/IO/HVFS.hs
+
+
 2005-02-01 22:18:39 GMT	John Goerzen <jgoerzen at complete.org>	patch-185
 
     Summary:
diff --git a/libsrc/MissingH/AnyDBM/StringDBM.hs b/libsrc/MissingH/AnyDBM/StringDBM.hs
index 8701702..8685377 100644
--- a/libsrc/MissingH/AnyDBM/StringDBM.hs
+++ b/libsrc/MissingH/AnyDBM/StringDBM.hs
@@ -40,6 +40,8 @@ module MissingH.AnyDBM.StringDBM (StringDBM,
 where
 import MissingH.AnyDBM
 import System.IO
+import MissingH.IO.HVFS
+import MissingH.IO.HVIO
 import Data.HashTable
 
 {- | The type of the StringDBM instances. -}
diff --git a/libsrc/MissingH/IO/HVFS.hs b/libsrc/MissingH/IO/HVFS.hs
index 53fc534..c40d062 100644
--- a/libsrc/MissingH/IO/HVFS.hs
+++ b/libsrc/MissingH/IO/HVFS.hs
@@ -227,8 +227,22 @@ eh :: HVFS a => a -> String -> IO c
 eh fs desc = vRaiseError fs illegalOperationErrorType 
              (desc ++ " is not implemented in this HVFS class") Nothing
 
+{- | Types that can open a HVIO object should be instances of this class.
+You need only implement 'vOpen'. -}
+
 class HVFS a => HVFSOpenable a where
     vOpen :: a -> FilePath -> IOMode -> IO HVFSOpenEncap
+    vReadFile :: a -> FilePath -> IO String
+    vWriteFile :: a -> FilePath -> String -> IO ()
+
+    vReadFile h fp = 
+        do oe <- vOpen h fp ReadMode
+           withOpen oe (\fh -> vGetContents fh)
+
+    vWriteFile h fp s =
+        do oe <- vOpen h fp WriteMode
+           withOpen oe (\fh -> do vPutStr fh s
+                                  vClose fh)
 
 instance Show FileStatus where
     show _ = "<FileStatus>"

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list