libmdbx 0.1.0.3 → 0.1.0.4
raw patch · 7 files changed
+23/−14 lines, 7 filesdep −string-interpolatedep ~basedep ~storePVP ok
version bump matches the API change (PVP)
Dependencies removed: string-interpolate
Dependency ranges changed: base, store
API changes (from Hackage documentation)
Files
- ChangeLog.md +9/−0
- app/Main.hs +1/−3
- libmdbx.cabal +5/−6
- src/Mdbx/API.hs +1/−0
- src/Mdbx/Database.hs +1/−0
- src/Mdbx/FFI.chs +1/−1
- src/Mdbx/Types.hs +5/−4
ChangeLog.md view
@@ -1,3 +1,12 @@+### 0.1.0.4++* Require base 4.12 (deriving via is only available since GHC 8.6)+* Remove dependency on string-interpolate.++### 0.1.0.1 - 0.1.0.3++* Fixing Hackage deployment.+ ### 0.1.0.0 * Initial release.
app/Main.hs view
@@ -3,7 +3,6 @@ {-# LANGUAGE DerivingVia #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeApplications #-} @@ -11,7 +10,6 @@ import Control.Exception (bracket) import Data.Store-import Data.String.Interpolate (i) import Data.Text (Text) import GHC.Generics @@ -29,7 +27,7 @@ openEnvDbi = envOpen "./testdb" [MdbxNosubdir, MdbxCoalesce, MdbxLiforeclaim] userKey :: User -> Text-userKey user = [i|user-#{_username user}|]+userKey user = "user-" <> _username user main :: IO () main = bracket openEnvDbi envClose $ \env -> do
libmdbx.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: libmdbx-version: 0.1.0.3+version: 0.1.0.4 synopsis: Bindings for libmdbx, an embedded key/value store description: Haskell bindings for [libmdbx](https://github.com/erthink/libmdbx). .@@ -49,7 +49,7 @@ build-tools: c2hs build-depends:- base >=4.11 && <5+ base >=4.12 && <5 , mtl >=2.1 && <2.3 , text ==1.2.* default-language: Haskell2010@@ -63,12 +63,11 @@ app ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends:- base >=4.11 && <5+ base >=4.12 && <5 , bytestring >=0.10 && <0.12 , libmdbx , mtl >=2.1 && <2.3- , store ==0.7.*- , string-interpolate >=0.2 && <0.4+ , store >=0.5 && <0.8 , text ==1.2.* default-language: Haskell2010 @@ -81,7 +80,7 @@ test ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends:- base >=4.11 && <5+ base >=4.12 && <5 , libmdbx , mtl >=2.1 && <2.3 , text ==1.2.*
src/Mdbx/API.hs view
@@ -43,6 +43,7 @@ ) where import Control.Monad.IO.Class (MonadIO, liftIO)+import Control.Monad.Fail (MonadFail) import Mdbx.FFI
src/Mdbx/Database.hs view
@@ -23,6 +23,7 @@ ) where import Control.Monad (forM, forM_, void)+import Control.Monad.Fail (MonadFail) import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Function (fix) import Data.Maybe (catMaybes, fromJust)
src/Mdbx/FFI.chs view
@@ -9,7 +9,7 @@ Low level bindings to libmdbx functions. -} {-# LANGUAGE DerivingStrategies #-}-{-# LANGUAGE GeneralisedNewtypeDeriving #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StandaloneDeriving #-} module Mdbx.FFI (
src/Mdbx/Types.hs view
@@ -43,7 +43,8 @@ <https://hackage.haskell.org/package/cereal cereal>, etc, and apply the newtype deriving via trick. -The 'Data.Store.Store' instance can be defined as:+The <https://hackage.haskell.org/package/store/docs/Data-Store.html#t:Store Store>+instance can be defined as: @ newtype MdbxItemStore a = MdbxItemStore {@@ -68,10 +69,10 @@ bsV = encode val @ -This code can be adaptad to other serialization libraries. It is not provided as-part of libmdbx-hs itself to avoid forcing dependencies.+This example can be adapted to other serialization libraries. It is not provided+as part of libmdbx-hs itself to avoid forcing dependencies. -Then, to derive the instance for your owwn type:+Then, to derive the instance for your own type: @ data User = User {