direct-sqlite 2.3.22 → 2.3.23
raw patch · 3 files changed
+18/−5 lines, 3 filesdep +semigroupsdep ~basePVP ok
version bump matches the API change (PVP)
Dependencies added: semigroups
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Database.SQLite3.Direct: instance Data.Semigroup.Semigroup Database.SQLite3.Direct.Utf8
Files
- Database/SQLite3/Direct.hs +8/−2
- changelog +7/−0
- direct-sqlite.cabal +3/−3
Database/SQLite3/Direct.hs view
@@ -137,6 +137,8 @@ import qualified Data.ByteString as BS import qualified Data.ByteString.Unsafe as BSU+import qualified Data.List.NonEmpty as NEL+import Data.Semigroup (Semigroup ((<>), sconcat)) import qualified Data.Text as T import qualified Data.Text.Encoding as T import Control.Applicative ((<$>))@@ -144,7 +146,7 @@ import Control.Monad (join, unless) import Data.ByteString (ByteString) import Data.IORef-import Data.Monoid+import Data.Monoid (Monoid (mempty, mappend, mconcat)) import Data.String (IsString(..)) import Data.Text.Encoding.Error (lenientDecode) import Foreign@@ -178,9 +180,13 @@ instance IsString Utf8 where fromString = Utf8 . T.encodeUtf8 . T.pack +instance Semigroup Utf8 where+ Utf8 a <> Utf8 b = Utf8 (BS.append a b)+ sconcat = Utf8 . BS.concat . NEL.toList . fmap (\(Utf8 s) -> s)+ instance Monoid Utf8 where mempty = Utf8 BS.empty- mappend (Utf8 a) (Utf8 b) = Utf8 (BS.append a b)+ mappend = (<>) mconcat = Utf8 . BS.concat . map (\(Utf8 s) -> s) packUtf8 :: a -> (Utf8 -> a) -> CString -> IO a
changelog view
@@ -1,3 +1,10 @@+v2.3.23:+ * Add Semigroup instance to support GHC 8.4.1 (thanks @gwils)+ * Build clean up for Android support (thanks @kmicklas)++v2.3.22:+ * Update sqlite to 3.22.0+ v2.3.21 * Update sqlite to 3.20.1 * Add -DSQLITE_ENABLE_FTS5 to build options
direct-sqlite.cabal view
@@ -1,5 +1,5 @@ name: direct-sqlite-version: 2.3.22+version: 2.3.23 build-type: Simple license: BSD3 license-file: LICENSE@@ -11,7 +11,6 @@ category: Database synopsis: Low-level binding to SQLite3. Includes UTF8 and BLOB support. Cabal-version: >= 1.10-Build-type: Simple description: This package is not very different from the other SQLite3 bindings out there, but it fixes a few deficiencies I was finding. As compared to@@ -60,7 +59,7 @@ cpp-options: -Ddirect_sqlite_systemlib extra-libraries: sqlite3 } else {- if !os(windows) {+ if !os(windows) && !os(android) { extra-libraries: pthread } c-sources: cbits/sqlite3.c@@ -92,6 +91,7 @@ include-dirs: . build-depends: base >= 4.1 && < 5, bytestring >= 0.9.2.1,+ semigroups >= 0.18 && < 0.19, text >= 0.11 ghc-options: -Wall -fwarn-tabs default-language: Haskell2010