packages feed

charset 0.3.9 → 0.3.10

raw patch · 3 files changed

+22/−5 lines, 3 filesdep ~bytestringdep ~containersPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: bytestring, containers

API changes (from Hackage documentation)

Files

CHANGELOG.markdown view
@@ -1,3 +1,9 @@+0.3.10 [2023.08.06]+-------------------+* Allow building with `bytestring-0.12.*`.+* Replace a use of `bytestring`'s `memset` function (which is now deprecated as+  of `bytestring-0.12.*`) with `base`'s `fillBytes` function.+ 0.3.9 [2021.11.01] ------------------ * Allow building with GHC 9.2.
charset.cabal view
@@ -1,5 +1,5 @@ name:          charset-version:       0.3.9+version:       0.3.10 license:       BSD3 license-File:  LICENSE copyright:     (c) Edward Kmett 2010-2012@@ -28,8 +28,10 @@    || ==8.6.5    || ==8.8.4    || ==8.10.7-   || ==9.0.1-   || ==9.2.1+   || ==9.0.2+   || ==9.2.7+   || ==9.4.5+   || ==9.6.2  source-repository head   type: git@@ -42,7 +44,7 @@   build-depends:     base                 >= 4       && < 5,     array                >= 0.2     && < 0.6,-    bytestring           >= 0.9     && < 0.12,+    bytestring           >= 0.9     && < 0.13,     containers           >= 0.2     && < 0.7,     unordered-containers >= 0.1.4.6 && < 0.3   if impl(ghc < 8.0)
src/Data/CharSet/ByteSet.hs view
@@ -44,6 +44,10 @@ import qualified Data.ByteString.Internal as I import qualified Data.ByteString.Unsafe as U +#if MIN_VERSION_base(4,8,0)+import Foreign.Marshal.Utils (fillBytes)+#endif+ newtype ByteSet = ByteSet B.ByteString deriving (Eq, Ord, Show)  -- | Representation of the index of a bit inside a bytestring@@ -65,7 +69,12 @@  fromList :: [Word8] -> ByteSet fromList s0 = ByteSet $ I.unsafeCreate 32 $ \t -> do-  _ <- I.memset t 0 32+  _ <-+#if MIN_VERSION_base(4,8,0)+    fillBytes t 0 32+#else+    I.memset t 0 32+#endif   let go [] = return ()       go (c:cs) = do         prev <- peekByteOff t byte :: IO Word8