anydbm 1.0.5 → 1.0.7
raw patch · 2 files changed
+29/−3 lines, 2 filesdep −haskell98dep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies removed: haskell98
Dependency ranges changed: base
API changes (from Hackage documentation)
- Database.AnyDBM: class AnyDBM a
+ Database.AnyDBM: class AnyDBM a where valuesA h = do { l <- toListA h; return $ map snd l } keysA h = do { l <- toListA h; return $ map fst l } toListA h = let conv k = do { v <- forceLookupA h k; return (k, v) } in do { k <- keysA h; mapM conv k } forceLookupA h key = do { x <- lookupA h key; case x of { Just y -> return y Nothing -> throwIO $ PatternMatchFail key } } insertListA h [] = return () insertListA h ((key, val) : xs) = do { insertA h key val; insertListA h xs } hasKeyA h k = do { l <- lookupA h k; case l of { Nothing -> return False Just _ -> return True } } closeA h = flushA h flushA h = return ()
Files
- anydbm.cabal +4/−3
- testsrc/runtests.hs +25/−0
anydbm.cabal view
@@ -1,10 +1,11 @@ Name: anydbm-Version: 1.0.5+Version: 1.0.7 License: GPL Maintainer: John Goerzen <jgoerzen@complete.org> Copyright: Copyright (c) 2004-2008 John Goerzen license-file: COPYRIGHT extra-source-files: COPYING+build-type: Simple homepage: http://software.complete.org/anydbm synopsis: Interface for DBM-like database systems Description: This module provides a generic infrastructure for supporting storage@@ -25,8 +26,8 @@ Database.AnyDBM.StringDBM Extensions: ExistentialQuantification, OverlappingInstances, UndecidableInstances, CPP, FlexibleInstances, TypeSynonymInstances-Build-Depends: base,- haskell98, mtl, MissingH>=1.0.0, containers+Build-Depends: base < 5,+ mtl, MissingH>=1.0.0, containers GHC-Options: -O2 Executable: runtests
+ testsrc/runtests.hs view
@@ -0,0 +1,25 @@+{- arch-tag: Test runner+Copyright (C) 2004 John Goerzen <jgoerzen@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+the Free Software Foundation; either version 2 of the License, or+(at your option) any later version.++This program is distributed in the hope that it will be useful,+but WITHOUT ANY WARRANTY; without even the implied warranty of+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+GNU General Public License for more details.++You should have received a copy of the GNU General Public License+along with this program; if not, write to the Free Software+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA+-}++module Main where ++import Test.HUnit+import Tests++main = runTestTT tests+