packages feed

genvalidity-sydtest-hashable 1.0.0.0 → 1.0.0.1

raw patch · 3 files changed

+23/−18 lines, 3 files

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog +## [1.0.0.1] - 2023-10-04++* Compatibility with `hashable >= 1.4`+ ## [1.0.0.0] - 2021-11-20  * Compatibility with `genvalidity >= 1.0.0.0`
genvalidity-sydtest-hashable.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.35.2. -- -- see: https://github.com/sol/hpack  name:           genvalidity-sydtest-hashable-version:        1.0.0.0+version:        1.0.0.1 synopsis:       Standard spec's for Hashable instances for sydtest description:    Standard spec's for Hashable instances for sydtest category:       Testing
src/Test/Syd/Validity/Hashable.hs view
@@ -2,6 +2,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-}+{-# OPTIONS_GHC -Wno-redundant-constraints #-}  -- | Hashable properties --@@ -71,19 +72,19 @@   parallel $ do     let name = nameOf @a         hashablestr = unwords ["hashWithSalt :: Int ->", name, "-> Int"]-    describe ("Hashable " ++ name) $-      describe hashablestr $-        it-          ( unwords-              [ "satisfies (a == b) => (hashWithSalt n a) ==",-                "(hashWithSalt n b), for every n and for",-                genname,-                name-              ]-          )-          $ let ss (a, b) = (,) <$> s a <*> s b-             in forAllShrink gen ss $ \(a1, a2) ->-                  forAllValid $ \int ->-                    when (a1 == a2) $-                      let h = hashWithSalt int-                       in h a1 `shouldBe` h a2+    describe ("Hashable " ++ name)+      $ describe hashablestr+      $ it+        ( unwords+            [ "satisfies (a == b) => (hashWithSalt n a) ==",+              "(hashWithSalt n b), for every n and for",+              genname,+              name+            ]+        )+      $ let ss (a, b) = (,) <$> s a <*> s b+         in forAllShrink gen ss $ \(a1, a2) ->+              forAllValid $ \int ->+                when (a1 == a2) $+                  let h = hashWithSalt int+                   in h a1 `shouldBe` h a2