acid-state 0.13.1 → 0.14.0
raw patch · 4 files changed
+24/−16 lines, 4 filesdep ~arraydep ~basedep ~bytestringnew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: array, base, bytestring, cereal, containers, directory, extensible-exceptions, filepath, mtl, network, safecopy, stm, template-haskell
API changes (from Hackage documentation)
Files
- CHANGELOG.md +13/−0
- acid-state.cabal +3/−2
- src/Data/Acid/Archive.hs +5/−4
- src/Data/Acid/TemplateHaskell.hs +3/−10
+ CHANGELOG.md view
@@ -0,0 +1,13 @@+0.14.0+======++ - fixes for cereal 0.5 while maintaining cereal 0.4+ compatibility. IMPORTANT: cereal 0.5 / safecopy 0.9 change the+ serialization format of Float/Double. Migration should be performed+ automatically on old data. However, you should be aware that once+ you upgrade to safecopy 0.9 / cereal 0.5, your data will be+ migrated and not readable by older versions of your application+ which are compiled against safecopy 0.8 / cereal 0.4.++ - additional fixes for TH and kinded type variables+ [https://github.com/acid-state/acid-state/pull/56](https://github.com/acid-state/acid-state/pull/56)
acid-state.cabal view
@@ -1,5 +1,5 @@ Name: acid-state-Version: 0.13.1+Version: 0.14.0 Synopsis: Add ACID guarantees to any serializable Haskell data structure. Description: Use regular Haskell data structures as your database and get stronger ACID guarantees than most RDBMS offer. Homepage: http://acid-state.seize.it/@@ -11,6 +11,7 @@ Build-type: Simple Cabal-version: >=1.10 Extra-source-files:+ CHANGELOG.md examples/*.hs examples/errors/*.hs src-win32/*.hs@@ -34,7 +35,7 @@ Build-depends: array, base >= 4 && < 5,- bytestring >= 0.10,+ bytestring >= 0.10.2, cereal >= 0.4.1.0, containers, extensible-exceptions,
src/Data/Acid/Archive.hs view
@@ -18,8 +18,8 @@ import qualified Data.ByteString as Strict import qualified Data.ByteString.Lazy as Lazy+import Data.ByteString.Builder import Data.Monoid-import Data.Serialize.Builder import Data.Serialize.Get hiding (Result (..)) import qualified Data.Serialize.Get as Serialize @@ -39,11 +39,12 @@ putEntry :: Entry -> Builder putEntry content- = putWord64le contentLength `mappend`- putWord16le contentHash `mappend`- fromLazyByteString content+ = word64LE contentLength !<>+ word16LE contentHash !<>+ lazyByteString content where contentLength = fromIntegral $ Lazy.length content contentHash = crc16 content+ a !<> b = let c = a <> b in c `seq` c putEntries :: [Entry] -> Builder putEntries = mconcat . map putEntry
src/Data/Acid/TemplateHaskell.hs view
@@ -249,7 +249,7 @@ structName (x:xs) = toUpper x : xs mkCxtFromTyVars preds tyvars extraContext- = cxt $ [ classP classPred [varT tyvar] | tyvar <- plainTyVarBndrNames tyvars, classPred <- preds ] +++ = cxt $ [ classP classPred [varT tyvar] | tyvar <- allTyVarBndrNames tyvars, classPred <- preds ] ++ map return extraContext {-@@ -262,7 +262,7 @@ = do let preds = [ ''SafeCopy, ''Typeable ] ty = AppT (ConT ''Method) (foldl AppT (ConT eventStructName) (map VarT (allTyVarBndrNames tyvars))) structType = foldl appT (conT eventStructName) (map varT (allTyVarBndrNames tyvars))- instanceD (cxt $ [ classP classPred [varT tyvar] | tyvar <- plainTyVarBndrNames tyvars, classPred <- preds ] ++ map return context)+ instanceD (cxt $ [ classP classPred [varT tyvar] | tyvar <- allTyVarBndrNames tyvars, classPred <- preds ] ++ map return context) (return ty) #if __GLASGOW_HASKELL__ >= 707 [ tySynInstD ''MethodResult (tySynEqn [structType] (return resultType))@@ -283,7 +283,7 @@ = do let preds = [ ''SafeCopy, ''Typeable ] eventClass = if isUpdate then ''UpdateEvent else ''QueryEvent ty = AppT (ConT eventClass) (foldl AppT (ConT eventStructName) (map VarT (allTyVarBndrNames tyvars)))- instanceD (cxt $ [ classP classPred [varT tyvar] | tyvar <- plainTyVarBndrNames tyvars, classPred <- preds ] ++ map return context)+ instanceD (cxt $ [ classP classPred [varT tyvar] | tyvar <- allTyVarBndrNames tyvars, classPred <- preds ] ++ map return context) (return ty) [] where (tyvars, context, _args, _stateType, _resultType, isUpdate) = analyseType eventName eventType@@ -328,13 +328,6 @@ tyVarBndrName :: TyVarBndr -> Name tyVarBndrName (PlainTV n) = n tyVarBndrName (KindedTV n _) = n--plainTyVarBndrName :: TyVarBndr -> Maybe Name-plainTyVarBndrName (PlainTV name) = Just name-plainTyVarBndrName _ = Nothing--plainTyVarBndrNames :: [TyVarBndr] -> [Name]-plainTyVarBndrNames tyvars = mapMaybe plainTyVarBndrName tyvars allTyVarBndrNames :: [TyVarBndr] -> [Name] allTyVarBndrNames tyvars = map tyVarBndrName tyvars