acid-state 0.7.1 → 0.7.2
raw patch · 2 files changed
+18/−13 lines, 2 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- acid-state.cabal +1/−1
- src/Data/Acid/Core.hs +17/−12
acid-state.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version: 0.7.1+Version: 0.7.2 -- A short (one-line) description of the package. Synopsis: Add ACID guarantees to any serializable Haskell data structure.
src/Data/Acid/Core.hs view
@@ -46,21 +46,13 @@ import Data.Serialize ( runPutLazy, runGetLazy ) import Data.SafeCopy ( SafeCopy, safeGet, safePut ) -import Data.Typeable ( Typeable, typeOf )+import Data.Typeable ( Typeable, TypeRep, typeOf ) import Unsafe.Coerce ( unsafeCoerce )-import Data.Typeable.Internal --- | The basic Method class. Each Method has an indexed result type--- and a unique tag.-class ( Typeable ev, SafeCopy ev- , Typeable (MethodResult ev), SafeCopy (MethodResult ev)) =>- Method ev where- type MethodResult ev- type MethodState ev- methodTag :: ev -> Tag- methodTag ev = Lazy.pack (showQualifiedTypeRep (typeOf ev))- #if MIN_VERSION_base(4,4,0)++import Data.Typeable.Internal ( TypeRep (..), tyConModule )+ -- in base >= 4.4 the Show instance for TypeRep no longer provides a -- fully qualified name. But we have old data around that expects the -- FQN. So we will recreate the old naming system for newer versions@@ -70,10 +62,23 @@ showQualifiedTypeRep tr = let (TypeRep _f con _rep) = tr in tyConModule con ++ "." ++ show tr+ #else+ showQualifiedTypeRep :: TypeRep -> String showQualifiedTypeRep tr = show tr+ #endif++-- | The basic Method class. Each Method has an indexed result type+-- and a unique tag.+class ( Typeable ev, SafeCopy ev+ , Typeable (MethodResult ev), SafeCopy (MethodResult ev)) =>+ Method ev where+ type MethodResult ev+ type MethodState ev+ methodTag :: ev -> Tag+ methodTag ev = Lazy.pack (showQualifiedTypeRep (typeOf ev)) -- | The control structure at the very center of acid-state. -- This module provides access to a mutable state through