packages feed

leancheck 0.9.8 → 0.9.10

raw patch · 4 files changed

+69/−10 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

changelog.md view
@@ -1,12 +1,21 @@ Changelog for LeanCheck ======================= +v0.9.10+-------++* `Test.LeanCheck.Utils.Type`: derive Typeable instances on GHC 7.8.+  Behaviour on newer GHCs (>= 7.10) versions is unaffected+  as they automatically derive Typeable instances for all types.+ v0.9.8 ------ -* `Test.LeanCheck.Utils.Type`: Typeable instances on GHC 7.10.-  Behaviour on newer GHCs (>= 8.0) versions is unaffected-  as they automatically derive Typeable instances for all types.+* `Test.LeanCheck.Utils.Type`: ~Typeable instances on GHC 7.10.~+  ~Behaviour on newer GHCs (>= 8.0) versions is unaffected~+  ~as they automatically derive Typeable instances for all types.~+  _Update:_ these instances were already present on v0.9.6.+  LeanCheck v0.9.8 is essentially the same as v0.9.6.  v0.9.6 ------
leancheck.cabal view
@@ -11,7 +11,7 @@ -- this cabal file too complicated.  -- Rudy  name:                leancheck-version:             0.9.8+version:             0.9.10 synopsis:            Enumerative property-based testing description:   LeanCheck is a simple enumerative property-based testing library.@@ -89,7 +89,7 @@ source-repository this   type:            git   location:        https://github.com/rudymatela/leancheck-  tag:             v0.9.8+  tag:             v0.9.10  library   exposed-modules: Test.LeanCheck
src/Test/LeanCheck/Utils/Types.hs view
@@ -9,9 +9,8 @@ -- -- Types to aid in property-based testing. {-# LANGUAGE CPP #-}-#if __GLASGOW_HASKELL__ == 710-{-# LANGUAGE AutoDeriveTypeable #-}--- from GHC 8.0 onward, Typeable instances are created automatically for all types.+#if __GLASGOW_HASKELL__ == 708+{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} #endif module Test.LeanCheck.Utils.Types   (@@ -94,6 +93,9 @@ import Test.LeanCheck.Tiers (noDupListCons, setCons, bagCons, mapCons) import Data.Ratio ((%)) import Data.Ix+#if __GLASGOW_HASKELL__ == 708+import Data.Typeable (Typeable)+#endif  narrowU :: Int -> Int -> Int narrowU w i = i `mod` 2^w@@ -994,3 +996,51 @@ instance Listable Digits where tiers = cons1 (Digits . map unDigit) instance Listable AlphaNums where tiers = cons1 (AlphaNums . map unAlphaNum) instance Listable Letters   where tiers = cons1 (Letters   . map unLetter)++#if __GLASGOW_HASKELL__ == 708+-- there's no need to derive these on GHC >= 7.10+-- as they are automatically derived+deriving instance Typeable Int1+deriving instance Typeable Int2+deriving instance Typeable Int3+deriving instance Typeable Int4+deriving instance Typeable Word1+deriving instance Typeable Word2+deriving instance Typeable Word3+deriving instance Typeable Word4+deriving instance Typeable Nat+deriving instance Typeable Nat1+deriving instance Typeable Nat2+deriving instance Typeable Nat3+deriving instance Typeable Nat4+deriving instance Typeable Nat5+deriving instance Typeable Nat6+deriving instance Typeable Nat7+deriving instance Typeable Natural+deriving instance Typeable X+deriving instance Typeable Xs+deriving instance Typeable NoDup+deriving instance Typeable Bag+deriving instance Typeable Set+deriving instance Typeable Map+deriving instance Typeable Space+deriving instance Typeable Lower+deriving instance Typeable Upper+deriving instance Typeable Alpha+deriving instance Typeable Digit+deriving instance Typeable AlphaNum+deriving instance Typeable Letter+deriving instance Typeable Spaces+deriving instance Typeable Lowers+deriving instance Typeable Uppers+deriving instance Typeable Alphas+deriving instance Typeable Digits+deriving instance Typeable AlphaNums+deriving instance Typeable Letters+deriving instance Typeable A+deriving instance Typeable B+deriving instance Typeable C+deriving instance Typeable D+deriving instance Typeable E+deriving instance Typeable F+#endif
test/types.hs view
@@ -8,7 +8,7 @@ import Data.Word import Data.Int import Data.Char hiding (Space)-#if __GLASGOW_HASKELL__ >= 710+#if __GLASGOW_HASKELL__ >= 708 import Data.Typeable (typeOf) #endif @@ -209,7 +209,7 @@   allTypeable :: Bool-#if __GLASGOW_HASKELL__ >= 710+#if __GLASGOW_HASKELL__ >= 708 allTypeable  =  True   where   _  =  [ typeOf (undefined :: Int1)