acid-state 0.6.1 → 0.6.2
raw patch · 2 files changed
+8/−7 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/Abstract.hs +7/−6
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.1+Version: 0.6.2 -- A short (one-line) description of the package. Synopsis: Add ACID guarantees to any serializable Haskell data structure.
src/Data/Acid/Abstract.hs view
@@ -94,9 +94,10 @@ downcast :: Typeable1 sub => AcidState st -> sub st downcast AcidState{acidSubState = AnyState sub}- = case gcast1 (Just sub) of- Just (Just typed_sub_struct) -> typed_sub_struct `asTypeOf` result- Nothing -> error $ "Data.Acid: Invalid subtype cast: " ++ show tag ++ " -> " ++ show (typeOf1 result)- where result = undefined- tag = show (typeOf1 sub)-+ = r + where+ r = case gcast1 (Just sub) of+ Just (Just x) -> x+ Nothing ->+ error $+ "Data.Acid: Invalid subtype cast: " ++ show (typeOf1 sub) ++ " -> " ++ show (typeOf1 r)