packages feed

avers 0.0.16 → 0.0.17.0

raw patch · 4 files changed

+18/−16 lines, 4 filesdep +cryptonitedep +memorydep ~aesondep ~aversdep ~hspecPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: cryptonite, memory

Dependency ranges changed: aeson, avers, hspec

API changes (from Hackage documentation)

- Avers: runQueryCollect :: (FromDatum a, IsSequence e, Result e ~ Sequence a) => Exp e -> Avers (Vector a)
+ Avers: runQueryCollect :: (FromDatum a, Result e ~ Sequence a) => Exp e -> Avers (Vector a)
- Avers.Storage.Backend: runQueryCollect :: (FromDatum a, IsSequence e, Result e ~ Sequence a) => Exp e -> Avers (Vector a)
+ Avers.Storage.Backend: runQueryCollect :: (FromDatum a, Result e ~ Sequence a) => Exp e -> Avers (Vector a)
- Avers.TH: parseJSON :: Value -> Parser a
+ Avers.TH: parseJSON :: FromJSON a => Value -> Parser a
- Avers.TH: parseJSONList :: Value -> Parser [a]
+ Avers.TH: parseJSONList :: FromJSON a => Value -> Parser [a]
- Avers.TH: toEncoding :: a -> Encoding
+ Avers.TH: toEncoding :: ToJSON a => a -> Encoding
- Avers.TH: toEncodingList :: [a] -> Encoding
+ Avers.TH: toEncodingList :: ToJSON a => [a] -> Encoding
- Avers.TH: toJSON :: a -> Value
+ Avers.TH: toJSON :: ToJSON a => a -> Value
- Avers.TH: toJSONList :: [a] -> Value
+ Avers.TH: toJSONList :: ToJSON a => [a] -> Value

Files

avers.cabal view
@@ -1,5 +1,5 @@ name: avers-version: 0.0.16+version: 0.0.17.0 cabal-version: >=1.10 build-type: Simple license: GPL-3@@ -33,7 +33,7 @@         Avers.Types         Avers.Views     build-depends:-        aeson >=1.0.1.0 && <1.1,+        aeson >=1.0.2.0 && <1.1,         attoparsec >=0.13.1.0 && <0.14,         base >=4.9.0.0 && <4.10,         bytestring >=0.10.8.1 && <0.11,@@ -51,8 +51,8 @@         unordered-containers >=0.2.7.1 && <0.3,         vector >=0.11.0.0 && <0.12,         MonadRandom >=0.4.2.3 && <0.5,-        base16-bytestring >=0.1.1.6 && <0.2,-        cryptohash >=0.11.9 && <0.12,+        cryptonite ==0.20.*,+        memory ==0.13.*,         inflections >=0.2.0.1 && <0.3,         resource-pool >=0.2.3.2 && <0.3,         rethinkdb-client-driver >=0.0.23 && <0.1,@@ -66,9 +66,9 @@     main-is: Test.hs     build-depends:         MonadRandom >=0.4.2.3 && <0.5,-        aeson >=1.0.1.0 && <1.1,+        aeson >=1.0.2.0 && <1.1,         attoparsec >=0.13.1.0 && <0.14,-        avers >=0.0.16 && <0.1,+        avers >=0.0.17.0 && <0.1,         base >=4.9.0.0 && <4.10,         base16-bytestring >=0.1.1.6 && <0.2,         bytestring >=0.10.8.1 && <0.11,@@ -92,8 +92,8 @@     type: exitcode-stdio-1.0     main-is: Benchmark.hs     build-depends:-        aeson >=1.0.1.0 && <1.1,-        avers >=0.0.16 && <0.1,+        aeson >=1.0.2.0 && <1.1,+        avers >=0.0.17.0 && <0.1,         base >=4.9.0.0 && <4.10,         mtl >=2.2.1 && <2.3,         criterion >=1.1.1.0 && <1.2,
src/Avers/Storage.hs view
@@ -26,7 +26,6 @@ import           Data.Monoid import           Data.Maybe import qualified Data.ByteString.Lazy   as BL-import qualified Data.ByteString.Base16 as BS16  import           Data.Vector        (Vector) import qualified Data.Vector        as V@@ -42,7 +41,8 @@ import           Data.Aeson (Value) import           Data.Aeson.Types (emptyObject) -import qualified Crypto.Hash.SHA3 as SHA3+import           Data.ByteArray.Encoding (Base(Base16), convertToBase)+import           Crypto.Hash (Digest, SHA3_256, hashlazy)  import qualified Database.RethinkDB as R @@ -609,7 +609,7 @@    where     size = fromIntegral $ BL.length body-    hash = BS16.encode $ SHA3.hashlazy 256 body+    hash = convertToBase Base16 $ (hashlazy body :: Digest SHA3_256)     blob = Blob (BlobId $ T.decodeUtf8 hash) size contentType  
src/Avers/Storage/Backend.hs view
@@ -112,7 +112,7 @@         Left e -> databaseError (T.pack $ show e)         Right r -> return r -runQueryCollect :: (R.FromDatum a, R.IsSequence e, R.Result e ~ R.Sequence a) => R.Exp e -> Avers (V.Vector a)+runQueryCollect :: (R.FromDatum a, R.Result e ~ R.Sequence a) => R.Exp e -> Avers (V.Vector a) runQueryCollect query = do     pool <- gets hDatabaseHandlePool     res <- liftIO $ withResource pool $ \handle -> do
src/Avers/TH.hs view
@@ -231,7 +231,9 @@     KindedTV n _ -> n  getFieldNames :: Con -> [Name]-getFieldNames (NormalC _ _)     = []-getFieldNames (InfixC _ _ _)    = []-getFieldNames (ForallC _ _ con) = getFieldNames con-getFieldNames (RecC _ fields)   = [name | (name, _, _) <- fields]+getFieldNames (NormalC _ _)         = []+getFieldNames (RecC _ fields)       = [name | (name, _, _) <- fields]+getFieldNames (InfixC _ _ _)        = []+getFieldNames (ForallC _ _ con)     = getFieldNames con+getFieldNames (GadtC _ _ _)         = []+getFieldNames (RecGadtC _ fields _) = [name | (name, _, _) <- fields]