acid-state 0.6.6 → 0.7.0
raw patch · 2 files changed
+19/−4 lines, 2 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
- Data.Acid.Advanced: class (Typeable ev, SafeCopy ev, Typeable (MethodResult ev), SafeCopy (MethodResult ev)) => Method ev where type family MethodResult ev type family MethodState ev methodTag ev = pack (show (typeOf ev))
+ Data.Acid.Advanced: class (Typeable ev, SafeCopy ev, Typeable (MethodResult ev), SafeCopy (MethodResult ev)) => Method ev where type family MethodResult ev type family MethodState ev methodTag ev = pack (showQualifiedTypeRep (typeOf ev))
Files
- acid-state.cabal +1/−1
- src/Data/Acid/Core.hs +18/−3
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.6.6+Version: 0.7.0 -- A short (one-line) description of the package. Synopsis: Add ACID guarantees to any serializable Haskell data structure.
src/Data/Acid/Core.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE GADTs, DeriveDataTypeable, TypeFamilies,+{-# LANGUAGE CPP, GADTs, DeriveDataTypeable, TypeFamilies, FlexibleContexts, BangPatterns #-} ----------------------------------------------------------------------------- -- |@@ -48,7 +48,7 @@ import Data.Typeable ( Typeable, typeOf ) import Unsafe.Coerce ( unsafeCoerce )-+import Data.Typeable.Internal -- | The basic Method class. Each Method has an indexed result type -- and a unique tag.@@ -58,7 +58,22 @@ type MethodResult ev type MethodState ev methodTag :: ev -> Tag- methodTag ev = Lazy.pack (show (typeOf ev))+ methodTag ev = Lazy.pack (showQualifiedTypeRep (typeOf ev))++#if MIN_VERSION_base(4,4,0)+-- 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+-- of base. We could do something better, but happstack-state is+-- end-of-life anyway.+showQualifiedTypeRep :: TypeRep -> String+showQualifiedTypeRep tr =+ let (TypeRep _f con _rep) = tr+ in tyConModule con ++ "." ++ show tr+#else+showQualifiedTypeRep :: TypeRep -> String+showQualifiedTypeRep tr = show tr+#endif -- | The control structure at the very center of acid-state. -- This module provides access to a mutable state through