packages feed

zlib 0.7.1.0 → 0.7.1.1

raw patch · 5 files changed

+41/−48 lines, 5 filesdep ~base

Dependency ranges changed: base

Files

Codec/Compression/Zlib/Internal.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, RankNTypes, DeriveDataTypeable, BangPatterns #-}+{-# LANGUAGE CPP, RankNTypes, BangPatterns #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE Trustworthy #-} -----------------------------------------------------------------------------@@ -80,7 +80,6 @@ import Control.Monad.ST.Lazy hiding (stToIO) import Control.Monad.ST.Strict (stToIO) import qualified Control.Monad.ST.Unsafe as Unsafe (unsafeIOToST)-import Data.Typeable (Typeable) import GHC.Generics (Generic) import Data.Bits (toIntegralSized) import qualified Data.ByteString.Lazy as L@@ -118,7 +117,6 @@   ( Eq       -- ^ @since 0.7.0.0   , Ord      -- ^ @since 0.7.0.0   , Show-  , Typeable -- ^ @since 0.7.0.0   , Generic  -- ^ @since 0.7.0.0   ) @@ -150,7 +148,6 @@   ( Eq       -- ^ @since 0.7.0.0   , Ord      -- ^ @since 0.7.0.0   , Show-  , Typeable -- ^ @since 0.7.0.0   , Generic  -- ^ @since 0.7.0.0   ) @@ -250,7 +247,6 @@   deriving   ( Eq   , Ord     -- ^ @since 0.7.0.0-  , Typeable   , Generic -- ^ @since 0.7.0.0            ) 
Codec/Compression/Zlib/Stream.hsc view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, ForeignFunctionInterface, DeriveDataTypeable #-}+{-# LANGUAGE CPP, ForeignFunctionInterface #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE CApiFFI #-} -----------------------------------------------------------------------------@@ -112,16 +112,13 @@ import Data.ByteString (ByteString) import Control.Applicative (Applicative(..)) import Control.Monad (ap,liftM)-#if MIN_VERSION_base(4,9,0) import qualified Control.Monad.Fail as Fail-#endif import Control.Monad.ST.Strict import Control.Monad.ST.Unsafe import Control.Exception (assert) import Data.Bits (toIntegralSized) import Data.Coerce (coerce) import Data.Maybe (fromMaybe)-import Data.Typeable (Typeable) import GHC.Generics (Generic) #ifdef DEBUG import System.IO (hPutStrLn, stderr)@@ -361,16 +358,12 @@ --  m >>= f = (m `thenZ` \a -> consistencyCheck `thenZ_` returnZ a) `thenZ` f   (>>)   = (*>) -#if !MIN_VERSION_base(4,9,0)-  fail   = (finalise >>) . failZ-#elif !MIN_VERSION_base(4,13,0)+#if !MIN_VERSION_base(4,13,0)   fail   = Fail.fail #endif -#if MIN_VERSION_base(4,9,0) instance Fail.MonadFail Stream where   fail   = (finalise >>) . failZ-#endif  returnZ :: a -> Stream a returnZ a = Z $ \_ inBuf outBuf outOffset outLength ->@@ -580,7 +573,7 @@ -- variations. -- data Format = GZip | Zlib | Raw | GZipOrZlib-  deriving (Eq, Ord, Enum, Bounded, Show, Typeable+  deriving (Eq, Ord, Enum, Bounded, Show               , Generic            ) @@ -622,7 +615,7 @@ -- | The compression method -- data Method = Deflated-  deriving (Eq, Ord, Enum, Bounded, Show, Typeable+  deriving (Eq, Ord, Enum, Bounded, Show               , Generic            ) @@ -645,7 +638,6 @@   ( Eq   , Ord -- ^ @since 0.7.0.0   , Show-  , Typeable   , Generic   ) @@ -705,7 +697,6 @@   ( Eq   , Ord   , Show-  , Typeable   , Generic   ) @@ -764,7 +755,6 @@   ( Eq   , Ord -- ^ @since 0.7.0.0   , Show-  , Typeable   , Generic   ) @@ -812,7 +802,7 @@   -- ^ @since 0.7.0.0   | Fixed   -- ^ @since 0.7.0.0-  deriving (Eq, Ord, Enum, Bounded, Show, Typeable+  deriving (Eq, Ord, Enum, Bounded, Show               , Generic            ) 
changelog.md view
@@ -1,5 +1,10 @@ See also http://pvp.haskell.org/faq +0.7.1.1 Bodigrim <andrew.lelechenko@gmail.com> September 2025++* Allow newer versions of dependencies.+* Fix new GHC warnings.+ 0.7.1.0 Bodigrim <andrew.lelechenko@gmail.com> April 2024  * Split zlib C sources into `zlib-clib` package (thanks @hasufell).
test/Test.hs view
@@ -25,11 +25,7 @@ import qualified Data.ByteString.Internal as BS #endif import System.IO-#if !(MIN_VERSION_base(4,6,0))-import Prelude hiding (catch)-#endif - main :: IO () main = defaultMain $   testGroup "zlib tests" [@@ -44,18 +40,18 @@       testProperty "compress works with BSes with non-zero offset"   prop_compress_nonzero_bs_offset     ],     testGroup "unit tests" [-      testProperty "simple gzip case"          test_simple_gzip,-      testProperty "detect bad CRC"            test_bad_crc,-      testProperty "detect non-gzip"           test_non_gzip,-      testProperty "detect custom dictionary"  test_custom_dict,-      testProperty "detect inflate with wrong dict"   test_wrong_dictionary,-      testProperty "detect inflate with right dict"   test_right_dictionary,-      testProperty "handle trailing data"      test_trailing_data,-      testProperty "multiple gzip members"     test_multiple_members,-      testProperty "check small input chunks"  test_small_chunks,-      testProperty "check empty input"         test_empty,-      testProperty "check exception raised"    test_exception,-      testProperty "check compress large chunk" test_compress_large_chunk+      testProperty "simple gzip case"               $ once test_simple_gzip,+      testProperty "detect bad CRC"                 $ once test_bad_crc,+      testProperty "detect non-gzip"                $ once test_non_gzip,+      testProperty "detect custom dictionary"       $ once test_custom_dict,+      testProperty "detect inflate with wrong dict" $ once test_wrong_dictionary,+      testProperty "detect inflate with right dict" $ once test_right_dictionary,+      testProperty "handle trailing data"           $ once test_trailing_data,+      testProperty "multiple gzip members"          $ once test_multiple_members,+      testProperty "check small input chunks"       $ once test_small_chunks,+      testProperty "check empty input"              $ once test_empty,+      testProperty "check exception raised"         $ once test_exception,+      testProperty "check compress large chunk"     $ once test_compress_large_chunk     ]   ] @@ -288,12 +284,16 @@     Right{} -> counterexample "expected exception" False  test_compress_large_chunk :: Property-test_compress_large_chunk = GZip.decompress (GZip.compress xs) === xs+test_compress_large_chunk =+  counterexample+    ("Expected " ++ show len ++ " zeros but got different result, please investigate manually")+    (property test)   where+    test = GZip.decompress (GZip.compress (BL.replicate len 0)) == BL.replicate len 0+     len = case finiteBitSize (0 :: Int) of       64 -> (1 `shiftL` 32) + 1       _ -> 0 -- ignore it-    xs = BL.fromStrict $ BS.replicate len 0  toStrict :: BL.ByteString -> BS.ByteString #if MIN_VERSION_bytestring(0,10,0)
zlib.cabal view
@@ -1,6 +1,6 @@ cabal-version:   >= 1.10 name:            zlib-version:         0.7.1.0+version:         0.7.1.1  copyright:       (c) 2006-2016 Duncan Coutts license:         BSD3@@ -31,9 +31,11 @@                , GHC == 9.0.2                , GHC == 9.2.8                , GHC == 9.4.8-               , GHC == 9.6.5-               , GHC == 9.8.2-               , GHC == 9.10.1+               , GHC == 9.6.7+               , GHC == 9.8.4+               , GHC == 9.10.2+               , GHC == 9.12.2+               , GHC == 9.14.1  extra-source-files: changelog.md                     README.md@@ -79,12 +81,11 @@    default-language: Haskell2010 -  other-extensions: CPP, ForeignFunctionInterface, RankNTypes, BangPatterns,-                    DeriveDataTypeable+  other-extensions: CPP, ForeignFunctionInterface, RankNTypes, BangPatterns   other-extensions: DeriveGeneric   other-extensions: CApiFFI -  build-depends:   base >= 4.9 && < 4.21,+  build-depends:   base >= 4.9 && < 4.23,                    bytestring >= 0.9 && < 0.13    build-tools:     hsc2hs >= 0.67 && < 0.69@@ -92,8 +93,6 @@     build-tools:     hsc2hs < 0.68.5     -- GHC 7 ships hsc2hs-0.67 -  -- use `includes:` to include them when compiling-  includes:        zlib.h hs-zlib.h   include-dirs:    cbits-extra   c-sources:       cbits-extra/hs-zlib.c   ghc-options:     -Wall -fwarn-tabs@@ -129,5 +128,8 @@   build-depends:   base, bytestring, zlib,                    QuickCheck       == 2.*,                    tasty            >= 0.8 && < 1.6,-                   tasty-quickcheck >= 0.8 && < 0.11+                   tasty-quickcheck >= 0.8 && < 1   ghc-options:     -Wall++  if impl(ghc >= 9.4)+    ghc-options:   "-with-rtsopts=-M1G"