packages feed

regular-extras 0.2.1 → 0.2.2

raw patch · 3 files changed

+17/−4 lines, 3 filesdep ~QuickCheck

Dependency ranges changed: QuickCheck

Files

ChangeLog view
@@ -1,3 +1,5 @@+version 0.2.2: Add support for QuickCheck 2+ version 0.2.1: relax dependency on QuickCheck  version 0.2.0: add gdseq (using the deepseq package for base cases)
regular-extras.cabal view
@@ -1,5 +1,5 @@ name:                   regular-extras-version:                0.2.1+version:                0.2.2 synopsis:               Additional functions for regular: arbitrary,                         coarbitrary, and binary get/put. description:@@ -24,6 +24,9 @@ extra-source-files:     examples/Test.hs                         ChangeLog +flag quickcheck2+  description:          Are we using Quickcheck 2?+  default:              True  library   hs-source-dirs:       src@@ -34,6 +37,9 @@   other-modules:        Generics.Regular.Functions.Fixpoints      build-depends:        base >= 4.0 && < 5, regular >= 0.3 && < 0.4,-                        QuickCheck >= 1.2 && < 1.3, binary >= 0.2,-                        deepseq < 2+                        binary >= 0.2, deepseq < 2+  if flag(quickcheck2)+    build-depends:      QuickCheck >= 2.1 && < 2.5+  else+    build-depends:      QuickCheck >= 1.2 && < 1.3   ghc-options:          -Wall
src/Generics/Regular/Functions/Arbitrary.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE OverlappingInstances     #-} {-# LANGUAGE ScopedTypeVariables      #-} {-# LANGUAGE TypeOperators            #-}+{-# LANGUAGE CPP                      #-}  {-# OPTIONS_GHC -fno-warn-orphans     #-} @@ -34,7 +35,7 @@ import Generics.Regular.Base  import Test.QuickCheck (Gen, frequency, sized, variant)-import qualified Test.QuickCheck as Q (Arbitrary, arbitrary, coarbitrary)+import qualified Test.QuickCheck as Q import Data.Maybe (fromJust)  -- | A frequency table detailing how often certain constructors should be@@ -124,7 +125,11 @@ instance CoArbitrary U where   hcoarbitrary _ _ _ = id +#if MIN_VERSION_QuickCheck(2,1,0)+instance (Q.CoArbitrary a) => CoArbitrary (K a) where+#else instance (Q.Arbitrary a) => CoArbitrary (K a) where+#endif   hcoarbitrary _ _ (K a) = Q.coarbitrary a  instance (CoArbitrary f, CoArbitrary g) => CoArbitrary (f :*: g) where