hedgehog-classes 0.2.5.3 → 0.2.5.4
raw patch · 5 files changed
+39/−8 lines, 5 filesdep ~aesondep ~basedep ~containersPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson, base, containers, hedgehog, primitive, transformers
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- hedgehog-classes.cabal +7/−5
- src/Hedgehog/Classes/Common/PP.hs +8/−0
- src/Hedgehog/Classes/Json.hs +11/−3
- src/Hedgehog/Classes/Prim.hs +8/−0
CHANGELOG.md view
@@ -3,6 +3,11 @@ `hedgehog-classes` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. +Unreleased+=======+* Make `Hedgehog.Classes.Aeson` module empty when the `aeson` flag is disabled.+* Make `Hedgehog.Classes.Prim` module empty when the `primitive` flag is disabled.+ 0.2.5.3 ======= * Correct bug in which `storablePeekByte` uses the wrong offset values
hedgehog-classes.cabal view
@@ -2,7 +2,7 @@ name: hedgehog-classes version:- 0.2.5.3+ 0.2.5.4 synopsis: Hedgehog will eat your typeclass bugs description:@@ -41,6 +41,8 @@ , GHC == 8.8.3 , GHC == 8.10.1 , GHC == 9.0.1+ , GHC == 9.2.4+ , GHC == 9.4.2 source-repository head type:@@ -148,10 +150,10 @@ Hedgehog.Classes.Storable Hedgehog.Classes.Traversable build-depends:- , base >= 4.12 && < 4.17+ , base >= 4.12 && < 4.18 , binary >= 0.8 && < 0.9 , containers >= 0.5 && < 0.7- , hedgehog >= 1 && < 1.1+ , hedgehog >= 1 && < 1.3 , pretty-show >= 1.9 && < 1.11 , silently >= 1.2 && < 1.3 , transformers >= 0.5 && < 0.6@@ -161,7 +163,7 @@ default-language: Haskell2010 if flag(aeson)- build-depends: aeson >= 0.9 && < 2.1+ build-depends: aeson >= 0.9 && < 2.2 cpp-options: -DHAVE_AESON -- if flag(semigroupoids) -- build-depends: semigroupoids >= 0.5.3.0 && < 0.6.0.0@@ -173,7 +175,7 @@ build-depends: comonad >= 5.0 && < 5.1 cpp-options: -DHAVE_COMONAD if flag(vector)- build-depends: vector >= 0.12 && < 0.13+ build-depends: vector >= 0.12 && < 0.14 cpp-options: -DHAVE_VECTOR if flag(primitive) build-depends: primitive >= 0.6.4 && < 0.8
src/Hedgehog/Classes/Common/PP.hs view
@@ -35,8 +35,16 @@ ppResult :: MonadIO m => Report Result -> m (Doc Markup)+#if MIN_VERSION_hedgehog(1,2,0)+ppResult r@(Report tests discards coverage seed status) = case status of+ Failed (FailureReport shrinks shrinkPath _mcoverage annots _mspan msg _mdiff footnotes) ->+ let failure = Failed $ FailureReport shrinks shrinkPath Nothing annots Nothing msg Nothing footnotes+ in R.ppResult Nothing (Report tests discards coverage seed failure)+ _ -> R.ppResult Nothing r+#else ppResult r@(Report tests discards coverage status) = case status of Failed (FailureReport size seed shrinks _mcoverage annots _mspan msg _mdiff footnotes) -> let failure = Failed $ FailureReport size seed shrinks Nothing annots Nothing msg Nothing footnotes in R.ppResult Nothing (Report tests discards coverage failure) _ -> R.ppResult Nothing r+#endif
src/Hedgehog/Classes/Json.hs view
@@ -1,5 +1,12 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} +#ifndef HAVE_AESON++module Hedgehog.Classes.Json () where++#else+ module Hedgehog.Classes.Json (jsonLaws) where import Hedgehog@@ -35,7 +42,7 @@ , "encode x = " ++ showEncoded ] , lawContextReduced = reduced lhs rhs- } + } heqCtx lhs rhs ctx jsonEncodingEqualsValue :: forall a. (ToJSON a, Show a) => Gen a -> Property@@ -58,7 +65,8 @@ , "encoded = " ++ showEncoded , "decoded = " ++ showDecoded ]- , lawContextReduced = reduced lhs rhs + , lawContextReduced = reduced lhs rhs }- heqCtx lhs rhs ctx + heqCtx lhs rhs ctx +#endif
src/Hedgehog/Classes/Prim.hs view
@@ -1,3 +1,4 @@+{-# language CPP #-} {-# language LambdaCase #-} {-# language UnboxedTuples #-} {-# language TypeApplications #-}@@ -5,6 +6,12 @@ {-# language BangPatterns #-} {-# language ScopedTypeVariables #-} +#ifndef HAVE_PRIMITIVE++module Hedgehog.Classes.Prim () where++#else+ module Hedgehog.Classes.Prim (primLaws) where import Control.Monad (when)@@ -257,3 +264,4 @@ ptrToList 0 xs === xs' +#endif