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


The following commit has been merged in the master branch:
commit 740e603b166e3ee4f6a3f9104dba9ac0ee0bf2a1
Author: John Goerzen <jgoerzen at complete.org>
Date:   Wed Feb 2 04:30:41 2005 +0100

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

diff --git a/ChangeLog b/ChangeLog
index e858538..5bd0130 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2005-02-01 21:30:41 GMT	John Goerzen <jgoerzen at complete.org>	patch-184
+
+    Summary:
+      Checkpointing
+    Revision:
+      missingh--head--0.7--patch-184
+
+
+    modified files:
+     ChangeLog libsrc/MissingH/AnyDBM.hs {arch}/=tagging-method
+
+
 2005-02-01 21:24:32 GMT	John Goerzen <jgoerzen at complete.org>	patch-183
 
     Summary:
diff --git a/libsrc/MissingH/AnyDBM.hs b/libsrc/MissingH/AnyDBM.hs
index 104715f..31a5473 100644
--- a/libsrc/MissingH/AnyDBM.hs
+++ b/libsrc/MissingH/AnyDBM.hs
@@ -36,13 +36,15 @@ or on-disk items.
 module MissingH.AnyDBM (-- * The AnyDBM class
                         AnyDBM(..),
                         -- * AnyDBM utilities
-                        keysA, valuesA, mapA
+                        keysA, valuesA, mapA,
+                        strFromA, strToA
                        )
 where
 import Prelude hiding (lookup)
 import System.IO
 import Data.HashTable
 import Control.Exception
+import MissingH.List(strFromAL, strToAL)
 
 {- | The main class for items implementing this interface.
 
@@ -128,9 +130,21 @@ mapA :: AnyDBM a => a -> ((String, String) -> IO b) -> IO [b]
 mapA h func = do l <- toListA h
                  mapM func l
 
+{- | Similar to 'MissingH.List.strToAL' -- load a string representation
+into the AnyDBM.  You must supply an existing AnyDBM object;
+the items loaded from the string will be added to it. -}
+strToA :: AnyDBM a => a -> String -> IO ()
+strToA h s = insertListA h (strToAL s)
+
+{- | Similar to 'MissingH.List.strFromAL' -- get a string representation of
+the entire AnyDBM. -}
+strFromA :: AnyDBM a => a -> IO String
+strFromA h = do l <- toListA h 
+                return (strFromAL l)
+
 instance AnyDBM (HashTable String String) where
     insertA = insert
     deleteA = delete
     lookupA = lookup
     toListA = toList
-    
\ No newline at end of file
+    

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list