explainable-predicates 0.1.2.4 → 0.1.3.0
raw patch · 4 files changed
+30/−16 lines, 4 filesdep ~QuickCheckdep ~basedep ~template-haskellPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: QuickCheck, base, template-haskell
API changes (from Hackage documentation)
- Test.Predicates: typed :: forall a b. (Typeable a, Typeable b) => Predicate a -> Predicate b
+ Test.Predicates: typed :: (Typeable a, Typeable b) => Predicate a -> Predicate b
- Test.Predicates.Internal.FlowMatcher: bipartiteMatching :: forall a b. (a -> b -> Bool) -> [a] -> [b] -> ([(a, b)], [a], [b])
+ Test.Predicates.Internal.FlowMatcher: bipartiteMatching :: (a -> b -> Bool) -> [a] -> [b] -> ([(a, b)], [a], [b])
Files
- CHANGELOG.md +10/−0
- README.md +1/−2
- explainable-predicates.cabal +14/−7
- src/Test/Predicates.hs +5/−7
CHANGELOG.md view
@@ -1,5 +1,15 @@ # Revision history for explainable-predicates +## 0.1.3.0 -- 2026-09-01++* Version bounds now allow GHC 9.10 through GHC 9.14.+* Version bounds now allow QuickCheck 2.18.+* Dropped support for GHC 8.x. The minimum supported version is now GHC 9.0.+* Fixed `-Wx-partial` warnings, so the `dev` flag (which adds `-Werror`)+ builds cleanly on GHC 9.8 and later.+* Fixed a duplicated guard in `negative`, which caused `explain` to report+ "value has unknown sign" instead of "value is positive" for positive values.+ ## 0.1.2.4 -- 2023-11-28 * Version bounds now allow GHC 9.6 and 9.8
README.md view
@@ -16,5 +16,4 @@ ### Which GHC versions are supported? -explainable-predicates is tested with GHC versions from 8.6 through 9.4.-+explainable-predicates is tested with GHC versions from 9.0 through 9.14.
explainable-predicates.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: explainable-predicates-version: 0.1.2.4+version: 0.1.3.0 synopsis: Predicates that can explain themselves. description: Explainable predicates are essentially functions from types to 'Bool' which can additionally describe themselves and@@ -18,13 +18,20 @@ author: Chris Smith <cdsmith@gmail.com> maintainer: Chris Smith <cdsmith@gmail.com> -extra-source-files: CHANGELOG.md, README.md+extra-doc-files: CHANGELOG.md, README.md -tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.5 || == 9.6.2 || == 9.8.1+tested-with: GHC == 9.0.2+ || == 9.2.8+ || == 9.4.8+ || == 9.6.7+ || == 9.8.4+ || == 9.10.3+ || == 9.12.4+ || == 9.14.1 source-repository head type: git- location: git://github.com/cdsmith/explainable-predicates.git+ location: https://github.com/cdsmith/explainable-predicates.git flag regex description: Enable regular expression matching@@ -56,9 +63,9 @@ Test.Predicates.Internal.FlowMatcher other-modules: Test.Predicates.Internal.Util build-depends: array >= 0.5.2 && < 0.6,- base >=4.12.0 && < 4.20,+ base >= 4.15.0 && < 4.23, syb >= 0.7.2 && < 0.8,- template-haskell >= 2.13.0 && < 2.22,+ template-haskell >= 2.17.0 && < 2.25, hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall -Wcompat -Wincomplete-uni-patterns@@ -72,7 +79,7 @@ cpp-options: -DCONTAINERS if flag(quickcheck)- build-depends: QuickCheck >= 2.8 && < 2.15,+ build-depends: QuickCheck >= 2.8 && < 2.19, exposed-modules: Test.Predicates.QuickCheck if flag(hunit)
src/Test/Predicates.hs view
@@ -548,7 +548,7 @@ else show x ++ " doesn't match " ++ pat } where- pat = "/" ++ init (tail $ show s) ++ "/"+ pat = "/" ++ init (drop 1 $ show s) ++ "/" accepts x = case matchOnceText r x of Just (a, _, b) -> a == empty && b == empty Nothing -> False@@ -583,7 +583,7 @@ else show x ++ " doesn't match " ++ pat } where- pat = "/" ++ init (tail $ show s) ++ "/i"+ pat = "/" ++ init (drop 1 $ show s) ++ "/i" accepts x = case matchOnceText r x of Just (a, _, b) -> a == empty && b == empty Nothing -> False@@ -619,7 +619,7 @@ explain = explainImpl } where- pat = "/" ++ init (tail $ show s) ++ "/"+ pat = "/" ++ init (drop 1 $ show s) ++ "/" r = makeRegexOpts comp exec s :: Regex comp = defaultCompOpt {newSyntax = True, lastStarGreedy = True} exec = defaultExecOpt {captureGroups = False}@@ -648,7 +648,7 @@ explain = explainImpl } where- pat = "/" ++ init (tail $ show s) ++ "/i"+ pat = "/" ++ init (drop 1 $ show s) ++ "/i" r = makeRegexOpts comp exec s :: Regex comp = defaultCompOpt@@ -1126,7 +1126,7 @@ if | signum x < 0 -> "value is negative" | x == 0 -> "value is zero"- | signum x < 0 -> "value is positive"+ | signum x > 0 -> "value is positive" | otherwise -> "value has unknown sign" } @@ -1412,9 +1412,7 @@ where countArguments (ForallT _ _ t) = countArguments t countArguments (AppT (AppT ArrowT _) t) = countArguments t + 1-#if MIN_VERSION_template_haskell(2,17,0) countArguments (AppT (AppT (AppT MulArrowT _) _) t) = countArguments t + 1-#endif countArguments _ = 0 -- | A Template Haskell splice that turns a quoted pattern into a predicate that