packages feed

hedgehog 1.0.2 → 1.0.3

raw patch · 15 files changed

+212/−62 lines, 15 filesdep +deepseqdep ~randomPVP ok

version bump matches the API change (PVP)

Dependencies added: deepseq

Dependency ranges changed: random

API changes (from Hackage documentation)

+ Hedgehog: evalNF :: (MonadTest m, NFData a, HasCallStack) => a -> m a
+ Hedgehog.Gen: either :: MonadGen m => m a -> m b -> m (Either a b)
+ Hedgehog.Gen: either_ :: MonadGen m => m a -> m b -> m (Either a b)
+ Hedgehog.Gen: filterT :: MonadGen m => (a -> Bool) -> m a -> m a
+ Hedgehog.Gen: justT :: MonadGen m => m (Maybe a) -> m a
+ Hedgehog.Gen: mapMaybeT :: MonadGen m => (a -> Maybe b) -> m a -> m b
+ Hedgehog.Internal.Gen: either :: MonadGen m => m a -> m b -> m (Either a b)
+ Hedgehog.Internal.Gen: either_ :: MonadGen m => m a -> m b -> m (Either a b)
+ Hedgehog.Internal.Prelude: (!!) :: () => [a] -> Int -> a
+ Hedgehog.Internal.Prelude: ($!) :: () => (a -> b) -> a -> b
+ Hedgehog.Internal.Prelude: ($) :: () => (a -> b) -> a -> b
+ Hedgehog.Internal.Prelude: (&&) :: Bool -> Bool -> Bool
+ Hedgehog.Internal.Prelude: (*) :: Num a => a -> a -> a
+ Hedgehog.Internal.Prelude: (**) :: Floating a => a -> a -> a
+ Hedgehog.Internal.Prelude: (*>) :: Applicative f => f a -> f b -> f b
+ Hedgehog.Internal.Prelude: (+) :: Num a => a -> a -> a
+ Hedgehog.Internal.Prelude: (++) :: () => [a] -> [a] -> [a]
+ Hedgehog.Internal.Prelude: (-) :: Num a => a -> a -> a
+ Hedgehog.Internal.Prelude: (.) :: () => (b -> c) -> (a -> b) -> a -> c
+ Hedgehog.Internal.Prelude: (/) :: Fractional a => a -> a -> a
+ Hedgehog.Internal.Prelude: (/=) :: Eq a => a -> a -> Bool
+ Hedgehog.Internal.Prelude: (<$) :: Functor f => a -> f b -> f a
+ Hedgehog.Internal.Prelude: (<$>) :: Functor f => (a -> b) -> f a -> f b
+ Hedgehog.Internal.Prelude: (<) :: Ord a => a -> a -> Bool
+ Hedgehog.Internal.Prelude: (<*) :: Applicative f => f a -> f b -> f a
+ Hedgehog.Internal.Prelude: (<*>) :: Applicative f => f (a -> b) -> f a -> f b
+ Hedgehog.Internal.Prelude: (<=) :: Ord a => a -> a -> Bool
+ Hedgehog.Internal.Prelude: (<>) :: Semigroup a => a -> a -> a
+ Hedgehog.Internal.Prelude: (=<<) :: Monad m => (a -> m b) -> m a -> m b
+ Hedgehog.Internal.Prelude: (==) :: Eq a => a -> a -> Bool
+ Hedgehog.Internal.Prelude: (>) :: Ord a => a -> a -> Bool
+ Hedgehog.Internal.Prelude: (>=) :: Ord a => a -> a -> Bool
+ Hedgehog.Internal.Prelude: (>>) :: Monad m => m a -> m b -> m b
+ Hedgehog.Internal.Prelude: (>>=) :: Monad m => m a -> (a -> m b) -> m b
+ Hedgehog.Internal.Prelude: (^) :: (Num a, Integral b) => a -> b -> a
+ Hedgehog.Internal.Prelude: (^^) :: (Fractional a, Integral b) => a -> b -> a
+ Hedgehog.Internal.Prelude: (||) :: Bool -> Bool -> Bool
+ Hedgehog.Internal.Prelude: EQ :: Ordering
+ Hedgehog.Internal.Prelude: False :: Bool
+ Hedgehog.Internal.Prelude: GT :: Ordering
+ Hedgehog.Internal.Prelude: Just :: a -> Maybe a
+ Hedgehog.Internal.Prelude: LT :: Ordering
+ Hedgehog.Internal.Prelude: Left :: a -> Either a b
+ Hedgehog.Internal.Prelude: Nothing :: Maybe a
+ Hedgehog.Internal.Prelude: Right :: b -> Either a b
+ Hedgehog.Internal.Prelude: True :: Bool
+ Hedgehog.Internal.Prelude: abs :: Num a => a -> a
+ Hedgehog.Internal.Prelude: acos :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: acosh :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: all :: Foldable t => (a -> Bool) -> t a -> Bool
+ Hedgehog.Internal.Prelude: and :: Foldable t => t Bool -> Bool
+ Hedgehog.Internal.Prelude: any :: Foldable t => (a -> Bool) -> t a -> Bool
+ Hedgehog.Internal.Prelude: appendFile :: FilePath -> String -> IO ()
+ Hedgehog.Internal.Prelude: asTypeOf :: () => a -> a -> a
+ Hedgehog.Internal.Prelude: asin :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: asinh :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: atan :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: atan2 :: RealFloat a => a -> a -> a
+ Hedgehog.Internal.Prelude: atanh :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: break :: () => (a -> Bool) -> [a] -> ([a], [a])
+ Hedgehog.Internal.Prelude: ceiling :: (RealFrac a, Integral b) => a -> b
+ Hedgehog.Internal.Prelude: class Functor f => Applicative (f :: Type -> Type)
+ Hedgehog.Internal.Prelude: class Bounded a
+ Hedgehog.Internal.Prelude: class Enum a
+ Hedgehog.Internal.Prelude: class Eq a
+ Hedgehog.Internal.Prelude: class Fractional a => Floating a
+ Hedgehog.Internal.Prelude: class Foldable (t :: Type -> Type)
+ Hedgehog.Internal.Prelude: class Num a => Fractional a
+ Hedgehog.Internal.Prelude: class Functor (f :: Type -> Type)
+ Hedgehog.Internal.Prelude: class (Real a, Enum a) => Integral a
+ Hedgehog.Internal.Prelude: class Applicative m => Monad (m :: Type -> Type)
+ Hedgehog.Internal.Prelude: class Monad m => MonadFail (m :: Type -> Type)
+ Hedgehog.Internal.Prelude: class Semigroup a => Monoid a
+ Hedgehog.Internal.Prelude: class Num a
+ Hedgehog.Internal.Prelude: class Eq a => Ord a
+ Hedgehog.Internal.Prelude: class Read a
+ Hedgehog.Internal.Prelude: class (Num a, Ord a) => Real a
+ Hedgehog.Internal.Prelude: class (RealFrac a, Floating a) => RealFloat a
+ Hedgehog.Internal.Prelude: class (Real a, Fractional a) => RealFrac a
+ Hedgehog.Internal.Prelude: class Semigroup a
+ Hedgehog.Internal.Prelude: class Show a
+ Hedgehog.Internal.Prelude: class (Functor t, Foldable t) => Traversable (t :: Type -> Type)
+ Hedgehog.Internal.Prelude: compare :: Ord a => a -> a -> Ordering
+ Hedgehog.Internal.Prelude: concat :: Foldable t => t [a] -> [a]
+ Hedgehog.Internal.Prelude: concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
+ Hedgehog.Internal.Prelude: const :: () => a -> b -> a
+ Hedgehog.Internal.Prelude: cos :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: cosh :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: curry :: () => ((a, b) -> c) -> a -> b -> c
+ Hedgehog.Internal.Prelude: cycle :: () => [a] -> [a]
+ Hedgehog.Internal.Prelude: data Bool
+ Hedgehog.Internal.Prelude: data Char
+ Hedgehog.Internal.Prelude: data Double
+ Hedgehog.Internal.Prelude: data Either a b
+ Hedgehog.Internal.Prelude: data Float
+ Hedgehog.Internal.Prelude: data IO a
+ Hedgehog.Internal.Prelude: data Int
+ Hedgehog.Internal.Prelude: data Integer
+ Hedgehog.Internal.Prelude: data Maybe a
+ Hedgehog.Internal.Prelude: data Ordering
+ Hedgehog.Internal.Prelude: data Word
+ Hedgehog.Internal.Prelude: decodeFloat :: RealFloat a => a -> (Integer, Int)
+ Hedgehog.Internal.Prelude: div :: Integral a => a -> a -> a
+ Hedgehog.Internal.Prelude: divMod :: Integral a => a -> a -> (a, a)
+ Hedgehog.Internal.Prelude: drop :: () => Int -> [a] -> [a]
+ Hedgehog.Internal.Prelude: dropWhile :: () => (a -> Bool) -> [a] -> [a]
+ Hedgehog.Internal.Prelude: either :: () => (a -> c) -> (b -> c) -> Either a b -> c
+ Hedgehog.Internal.Prelude: elem :: (Foldable t, Eq a) => a -> t a -> Bool
+ Hedgehog.Internal.Prelude: encodeFloat :: RealFloat a => Integer -> Int -> a
+ Hedgehog.Internal.Prelude: enumFrom :: Enum a => a -> [a]
+ Hedgehog.Internal.Prelude: enumFromThen :: Enum a => a -> a -> [a]
+ Hedgehog.Internal.Prelude: enumFromThenTo :: Enum a => a -> a -> a -> [a]
+ Hedgehog.Internal.Prelude: enumFromTo :: Enum a => a -> a -> [a]
+ Hedgehog.Internal.Prelude: error :: HasCallStack => [Char] -> a
+ Hedgehog.Internal.Prelude: errorWithoutStackTrace :: () => [Char] -> a
+ Hedgehog.Internal.Prelude: even :: Integral a => a -> Bool
+ Hedgehog.Internal.Prelude: exp :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: exponent :: RealFloat a => a -> Int
+ Hedgehog.Internal.Prelude: fail :: Monad m => String -> m a
+ Hedgehog.Internal.Prelude: flip :: () => (a -> b -> c) -> b -> a -> c
+ Hedgehog.Internal.Prelude: floatDigits :: RealFloat a => a -> Int
+ Hedgehog.Internal.Prelude: floatRadix :: RealFloat a => a -> Integer
+ Hedgehog.Internal.Prelude: floatRange :: RealFloat a => a -> (Int, Int)
+ Hedgehog.Internal.Prelude: floor :: (RealFrac a, Integral b) => a -> b
+ Hedgehog.Internal.Prelude: fmap :: Functor f => (a -> b) -> f a -> f b
+ Hedgehog.Internal.Prelude: foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m
+ Hedgehog.Internal.Prelude: foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
+ Hedgehog.Internal.Prelude: foldl1 :: Foldable t => (a -> a -> a) -> t a -> a
+ Hedgehog.Internal.Prelude: foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
+ Hedgehog.Internal.Prelude: foldr1 :: Foldable t => (a -> a -> a) -> t a -> a
+ Hedgehog.Internal.Prelude: fromEnum :: Enum a => a -> Int
+ Hedgehog.Internal.Prelude: fromInteger :: Num a => Integer -> a
+ Hedgehog.Internal.Prelude: fromIntegral :: (Integral a, Num b) => a -> b
+ Hedgehog.Internal.Prelude: fromRational :: Fractional a => Rational -> a
+ Hedgehog.Internal.Prelude: fst :: () => (a, b) -> a
+ Hedgehog.Internal.Prelude: gcd :: Integral a => a -> a -> a
+ Hedgehog.Internal.Prelude: getChar :: IO Char
+ Hedgehog.Internal.Prelude: getContents :: IO String
+ Hedgehog.Internal.Prelude: getLine :: IO String
+ Hedgehog.Internal.Prelude: head :: () => [a] -> a
+ Hedgehog.Internal.Prelude: id :: () => a -> a
+ Hedgehog.Internal.Prelude: infix 4 `notElem`
+ Hedgehog.Internal.Prelude: infixl 1 >>
+ Hedgehog.Internal.Prelude: infixl 4 <$>
+ Hedgehog.Internal.Prelude: infixl 6 -
+ Hedgehog.Internal.Prelude: infixl 7 *
+ Hedgehog.Internal.Prelude: infixl 9 !!
+ Hedgehog.Internal.Prelude: infixr 0 $!
+ Hedgehog.Internal.Prelude: infixr 1 =<<
+ Hedgehog.Internal.Prelude: infixr 2 ||
+ Hedgehog.Internal.Prelude: infixr 3 &&
+ Hedgehog.Internal.Prelude: infixr 5 ++
+ Hedgehog.Internal.Prelude: infixr 6 <>
+ Hedgehog.Internal.Prelude: infixr 8 ^
+ Hedgehog.Internal.Prelude: infixr 9 .
+ Hedgehog.Internal.Prelude: init :: () => [a] -> [a]
+ Hedgehog.Internal.Prelude: interact :: (String -> String) -> IO ()
+ Hedgehog.Internal.Prelude: ioError :: () => IOError -> IO a
+ Hedgehog.Internal.Prelude: isDenormalized :: RealFloat a => a -> Bool
+ Hedgehog.Internal.Prelude: isIEEE :: RealFloat a => a -> Bool
+ Hedgehog.Internal.Prelude: isInfinite :: RealFloat a => a -> Bool
+ Hedgehog.Internal.Prelude: isNaN :: RealFloat a => a -> Bool
+ Hedgehog.Internal.Prelude: isNegativeZero :: RealFloat a => a -> Bool
+ Hedgehog.Internal.Prelude: iterate :: () => (a -> a) -> a -> [a]
+ Hedgehog.Internal.Prelude: last :: () => [a] -> a
+ Hedgehog.Internal.Prelude: lcm :: Integral a => a -> a -> a
+ Hedgehog.Internal.Prelude: length :: Foldable t => t a -> Int
+ Hedgehog.Internal.Prelude: lex :: ReadS String
+ Hedgehog.Internal.Prelude: lines :: String -> [String]
+ Hedgehog.Internal.Prelude: log :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: logBase :: Floating a => a -> a -> a
+ Hedgehog.Internal.Prelude: lookup :: Eq a => a -> [(a, b)] -> Maybe b
+ Hedgehog.Internal.Prelude: mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
+ Hedgehog.Internal.Prelude: mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
+ Hedgehog.Internal.Prelude: mappend :: Monoid a => a -> a -> a
+ Hedgehog.Internal.Prelude: max :: Ord a => a -> a -> a
+ Hedgehog.Internal.Prelude: maxBound :: Bounded a => a
+ Hedgehog.Internal.Prelude: maximum :: (Foldable t, Ord a) => t a -> a
+ Hedgehog.Internal.Prelude: maybe :: () => b -> (a -> b) -> Maybe a -> b
+ Hedgehog.Internal.Prelude: mconcat :: Monoid a => [a] -> a
+ Hedgehog.Internal.Prelude: mempty :: Monoid a => a
+ Hedgehog.Internal.Prelude: min :: Ord a => a -> a -> a
+ Hedgehog.Internal.Prelude: minBound :: Bounded a => a
+ Hedgehog.Internal.Prelude: minimum :: (Foldable t, Ord a) => t a -> a
+ Hedgehog.Internal.Prelude: mod :: Integral a => a -> a -> a
+ Hedgehog.Internal.Prelude: negate :: Num a => a -> a
+ Hedgehog.Internal.Prelude: not :: Bool -> Bool
+ Hedgehog.Internal.Prelude: notElem :: (Foldable t, Eq a) => a -> t a -> Bool
+ Hedgehog.Internal.Prelude: null :: Foldable t => t a -> Bool
+ Hedgehog.Internal.Prelude: odd :: Integral a => a -> Bool
+ Hedgehog.Internal.Prelude: or :: Foldable t => t Bool -> Bool
+ Hedgehog.Internal.Prelude: otherwise :: Bool
+ Hedgehog.Internal.Prelude: pi :: Floating a => a
+ Hedgehog.Internal.Prelude: pred :: Enum a => a -> a
+ Hedgehog.Internal.Prelude: product :: (Foldable t, Num a) => t a -> a
+ Hedgehog.Internal.Prelude: properFraction :: (RealFrac a, Integral b) => a -> (b, a)
+ Hedgehog.Internal.Prelude: pure :: Applicative f => a -> f a
+ Hedgehog.Internal.Prelude: putChar :: Char -> IO ()
+ Hedgehog.Internal.Prelude: putStr :: String -> IO ()
+ Hedgehog.Internal.Prelude: putStrLn :: String -> IO ()
+ Hedgehog.Internal.Prelude: quot :: Integral a => a -> a -> a
+ Hedgehog.Internal.Prelude: quotRem :: Integral a => a -> a -> (a, a)
+ Hedgehog.Internal.Prelude: read :: Read a => String -> a
+ Hedgehog.Internal.Prelude: readFile :: FilePath -> IO String
+ Hedgehog.Internal.Prelude: readIO :: Read a => String -> IO a
+ Hedgehog.Internal.Prelude: readList :: Read a => ReadS [a]
+ Hedgehog.Internal.Prelude: readLn :: Read a => IO a
+ Hedgehog.Internal.Prelude: readParen :: () => Bool -> ReadS a -> ReadS a
+ Hedgehog.Internal.Prelude: reads :: Read a => ReadS a
+ Hedgehog.Internal.Prelude: readsPrec :: Read a => Int -> ReadS a
+ Hedgehog.Internal.Prelude: realToFrac :: (Real a, Fractional b) => a -> b
+ Hedgehog.Internal.Prelude: recip :: Fractional a => a -> a
+ Hedgehog.Internal.Prelude: rem :: Integral a => a -> a -> a
+ Hedgehog.Internal.Prelude: repeat :: () => a -> [a]
+ Hedgehog.Internal.Prelude: replicate :: () => Int -> a -> [a]
+ Hedgehog.Internal.Prelude: return :: Monad m => a -> m a
+ Hedgehog.Internal.Prelude: reverse :: () => [a] -> [a]
+ Hedgehog.Internal.Prelude: round :: (RealFrac a, Integral b) => a -> b
+ Hedgehog.Internal.Prelude: scaleFloat :: RealFloat a => Int -> a -> a
+ Hedgehog.Internal.Prelude: scanl :: () => (b -> a -> b) -> b -> [a] -> [b]
+ Hedgehog.Internal.Prelude: scanl1 :: () => (a -> a -> a) -> [a] -> [a]
+ Hedgehog.Internal.Prelude: scanr :: () => (a -> b -> b) -> b -> [a] -> [b]
+ Hedgehog.Internal.Prelude: scanr1 :: () => (a -> a -> a) -> [a] -> [a]
+ Hedgehog.Internal.Prelude: sconcat :: Semigroup a => NonEmpty a -> a
+ Hedgehog.Internal.Prelude: seq :: () => a -> b -> b
+ Hedgehog.Internal.Prelude: sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
+ Hedgehog.Internal.Prelude: sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)
+ Hedgehog.Internal.Prelude: sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
+ Hedgehog.Internal.Prelude: show :: Show a => a -> String
+ Hedgehog.Internal.Prelude: showChar :: Char -> ShowS
+ Hedgehog.Internal.Prelude: showList :: Show a => [a] -> ShowS
+ Hedgehog.Internal.Prelude: showParen :: Bool -> ShowS -> ShowS
+ Hedgehog.Internal.Prelude: showString :: String -> ShowS
+ Hedgehog.Internal.Prelude: shows :: Show a => a -> ShowS
+ Hedgehog.Internal.Prelude: showsPrec :: Show a => Int -> a -> ShowS
+ Hedgehog.Internal.Prelude: significand :: RealFloat a => a -> a
+ Hedgehog.Internal.Prelude: signum :: Num a => a -> a
+ Hedgehog.Internal.Prelude: sin :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: sinh :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: snd :: () => (a, b) -> b
+ Hedgehog.Internal.Prelude: span :: () => (a -> Bool) -> [a] -> ([a], [a])
+ Hedgehog.Internal.Prelude: splitAt :: () => Int -> [a] -> ([a], [a])
+ Hedgehog.Internal.Prelude: sqrt :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: stimes :: (Semigroup a, Integral b) => b -> a -> a
+ Hedgehog.Internal.Prelude: subtract :: Num a => a -> a -> a
+ Hedgehog.Internal.Prelude: succ :: Enum a => a -> a
+ Hedgehog.Internal.Prelude: sum :: (Foldable t, Num a) => t a -> a
+ Hedgehog.Internal.Prelude: tail :: () => [a] -> [a]
+ Hedgehog.Internal.Prelude: take :: () => Int -> [a] -> [a]
+ Hedgehog.Internal.Prelude: takeWhile :: () => (a -> Bool) -> [a] -> [a]
+ Hedgehog.Internal.Prelude: tan :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: tanh :: Floating a => a -> a
+ Hedgehog.Internal.Prelude: toEnum :: Enum a => Int -> a
+ Hedgehog.Internal.Prelude: toInteger :: Integral a => a -> Integer
+ Hedgehog.Internal.Prelude: toRational :: Real a => a -> Rational
+ Hedgehog.Internal.Prelude: traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
+ Hedgehog.Internal.Prelude: truncate :: (RealFrac a, Integral b) => a -> b
+ Hedgehog.Internal.Prelude: type FilePath = String
+ Hedgehog.Internal.Prelude: type IOError = IOException
+ Hedgehog.Internal.Prelude: type Rational = Ratio Integer
+ Hedgehog.Internal.Prelude: type ReadS a = String -> [(a, String)]
+ Hedgehog.Internal.Prelude: type ShowS = String -> String
+ Hedgehog.Internal.Prelude: type String = [Char]
+ Hedgehog.Internal.Prelude: uncurry :: () => (a -> b -> c) -> (a, b) -> c
+ Hedgehog.Internal.Prelude: undefined :: HasCallStack => a
+ Hedgehog.Internal.Prelude: unlines :: [String] -> String
+ Hedgehog.Internal.Prelude: until :: () => (a -> Bool) -> (a -> a) -> a -> a
+ Hedgehog.Internal.Prelude: unwords :: [String] -> String
+ Hedgehog.Internal.Prelude: unzip :: () => [(a, b)] -> ([a], [b])
+ Hedgehog.Internal.Prelude: unzip3 :: () => [(a, b, c)] -> ([a], [b], [c])
+ Hedgehog.Internal.Prelude: userError :: String -> IOError
+ Hedgehog.Internal.Prelude: words :: String -> [String]
+ Hedgehog.Internal.Prelude: writeFile :: FilePath -> String -> IO ()
+ Hedgehog.Internal.Prelude: zip :: () => [a] -> [b] -> [(a, b)]
+ Hedgehog.Internal.Prelude: zip3 :: () => [a] -> [b] -> [c] -> [(a, b, c)]
+ Hedgehog.Internal.Prelude: zipWith :: () => (a -> b -> c) -> [a] -> [b] -> [c]
+ Hedgehog.Internal.Prelude: zipWith3 :: () => (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
+ Hedgehog.Internal.Property: evalNF :: (MonadTest m, NFData a, HasCallStack) => a -> m a
+ Hedgehog.Internal.Show: Date :: String -> Value
+ Hedgehog.Internal.Show: Quote :: String -> Value
+ Hedgehog.Internal.Show: Time :: String -> Value

Files

CHANGELOG.md view
@@ -1,4 +1,15 @@+## Version 1.0.3 (2020-06-26)++- Don't swallow errors if we can't find the source file ([#387][387], [@HuwCampbell][HuwCampbell])+- Add `Property.evalNF` ([#384][384], [@dcastro][dcastro])+- Add `Gen.either` and `Gen.either_` ([#382][382], [@dcastro][dcastro])+- Add `filterT`, `justT`, and `mapMaybeT` to `Gen` exports ([#366][366], [@kquick][kquick])+- Bump pretty-show to 1.10 which supports quasi-quotes ([#365][365], [@jacobstanley][jacobstanley])+- Remove `undefined` in `GenT`'s `MonadWriter` instance ([#344][344], [@HuwCampbell][HuwCampbell])+- Make `Tree.interleave` logarithmtic rather than linear ([#313][313], [@edsko][edsko])+ ## Version 1.0.2 (2020-01-10)+- Support GHC 8.10  ([#376][376], [@sjakobi][sjakobi]) - Speed up `Tree.splits` ([#349][349], [@treeowl][treeowl]) - Speed up `Gen.shuffle` ([#348][348], [@treeowl][treeowl]) - Add docs on the bounds of `Size` ([#346][346], [@chris-martin][chris-martin])@@ -168,14 +179,30 @@ [treeowl]:   https://github.com/treeowl [tomjaguarpaw]:-  https://github.com/tomjaguarpaw +  https://github.com/tomjaguarpaw [symbiont-sam-halliday]:   https://github.com/symbiont-sam-halliday [sshine]:   https://github.com/sshine [stolyaroleh]:   https://github.com/stolyaroleh+[kquick]:+  https://github.com/kquick+[dcastro]:+  https://github.com/dcastro +[387]:+  https://github.com/hedgehogqa/haskell-hedgehog/pull/387+[384]:+  https://github.com/hedgehogqa/haskell-hedgehog/pull/384+[382]:+  https://github.com/hedgehogqa/haskell-hedgehog/pull/382+[376]:+  https://github.com/hedgehogqa/haskell-hedgehog/pull/376+[366]:+  https://github.com/hedgehogqa/haskell-hedgehog/pull/366+[365]:+  https://github.com/hedgehogqa/haskell-hedgehog/pull/365 [349]:   https://github.com/hedgehogqa/haskell-hedgehog/pull/349 [348]:@@ -184,6 +211,8 @@   https://github.com/hedgehogqa/haskell-hedgehog/pull/346 [345]:   https://github.com/hedgehogqa/haskell-hedgehog/pull/345+[344]:+  https://github.com/hedgehogqa/haskell-hedgehog/pull/344 [339]:   https://github.com/hedgehogqa/haskell-hedgehog/pull/339 [332]:@@ -196,6 +225,8 @@   https://github.com/hedgehogqa/haskell-hedgehog/pull/321 [319]:   https://github.com/hedgehogqa/haskell-hedgehog/pull/319+[313]:+  https://github.com/hedgehogqa/haskell-hedgehog/pull/313 [308]:   https://github.com/hedgehogqa/haskell-hedgehog/pull/308 [303]:
hedgehog.cabal view
@@ -1,4 +1,4 @@-version: 1.0.2+version: 1.0.3  name:   hedgehog@@ -29,14 +29,16 @@ license-file:   LICENSE cabal-version:-  >= 1.8+  >= 1.10 build-type:   Simple tested-with:     GHC == 8.0.2   , GHC == 8.2.2   , GHC == 8.4.4-  , GHC == 8.6.4+  , GHC == 8.6.5+  , GHC == 8.8.3+  , GHC == 8.10.1 extra-source-files:   README.md   CHANGELOG.md@@ -54,6 +56,7 @@     , bytestring                      >= 0.10       && < 0.11     , concurrent-output               >= 1.7        && < 1.11     , containers                      >= 0.4        && < 0.7+    , deepseq                         >= 1.1.0.0    && < 1.5     , directory                       >= 1.2        && < 1.4     , erf                             >= 2.0        && < 2.1     , exceptions                      >= 0.7        && < 0.11@@ -62,13 +65,13 @@     , mmorph                          >= 1.0        && < 1.2     , monad-control                   >= 1.0        && < 1.1     , mtl                             >= 2.1        && < 2.3-    , pretty-show                     >= 1.6        && < 1.10+    , pretty-show                     >= 1.6        && < 1.11     , primitive                       >= 0.6        && < 0.8     , random                          >= 1.1        && < 1.2     , resourcet                       >= 1.1        && < 1.3     , semigroups                      >= 0.16       && < 0.20     , stm                             >= 2.4        && < 2.6-    , template-haskell                >= 2.10       && < 2.16+    , template-haskell                >= 2.10       && < 2.17     , text                            >= 1.1        && < 1.3     , time                            >= 1.4        && < 1.10     , transformers                    >= 0.5        && < 0.6@@ -97,6 +100,7 @@     Hedgehog.Internal.Gen     Hedgehog.Internal.HTraversable     Hedgehog.Internal.Opaque+    Hedgehog.Internal.Prelude     Hedgehog.Internal.Property     Hedgehog.Internal.Queue     Hedgehog.Internal.Range@@ -112,6 +116,9 @@     Hedgehog.Internal.Tree     Hedgehog.Internal.Tripping +  default-language:+    Haskell2010+ test-suite test   type:     exitcode-stdio-1.0@@ -140,7 +147,10 @@     , containers                      >= 0.4        && < 0.7     , mmorph                          >= 1.0        && < 1.2     , mtl                             >= 2.1        && < 2.3-    , pretty-show                     >= 1.6        && < 1.10+    , pretty-show                     >= 1.6        && < 1.11     , semigroups                      >= 0.16       && < 0.20     , text                            >= 1.1        && < 1.3     , transformers                    >= 0.3        && < 0.6++  default-language:+    Haskell2010
src/Hedgehog.hs view
@@ -108,6 +108,7 @@   , tripping    , eval+  , evalNF   , evalM   , evalIO   , evalEither@@ -164,7 +165,7 @@ import           Hedgehog.Internal.Property (classify, cover) import           Hedgehog.Internal.Property (discard, failure, success) import           Hedgehog.Internal.Property (DiscardLimit, withDiscards)-import           Hedgehog.Internal.Property (eval, evalM, evalIO)+import           Hedgehog.Internal.Property (eval, evalNF, evalM, evalIO) import           Hedgehog.Internal.Property (evalEither, evalExceptT) import           Hedgehog.Internal.Property (footnote, footnoteShow) import           Hedgehog.Internal.Property (forAll, forAllWith)
src/Hedgehog/Gen.hs view
@@ -67,11 +67,16 @@   -- ** Conditional   , discard   , filter+  , filterT   , mapMaybe+  , mapMaybeT   , just+  , justT    -- ** Collections   , maybe+  , either+  , either_   , list   , seq   , nonEmpty@@ -106,4 +111,4 @@ import           Hedgehog.Internal.Gen import           Hedgehog.Internal.State (sequential, parallel) -import           Prelude hiding (filter, print, maybe, map, seq)+import           Prelude hiding (either, filter, print, maybe, map, seq)
src/Hedgehog/Internal/Discovery.hs view
@@ -2,6 +2,7 @@ {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE CPP #-} module Hedgehog.Internal.Discovery (     PropertySource(..)   , readProperties@@ -20,10 +21,13 @@ import           Data.Map (Map) import qualified Data.Map as Map import qualified Data.Ord as Ord-import           Data.Semigroup (Semigroup(..))  import           Hedgehog.Internal.Property (PropertyName(..)) import           Hedgehog.Internal.Source (LineNo(..), ColumnNo(..))++#if __GLASGOW_HASKELL__ < 808+import           Data.Semigroup (Semigroup(..))+#endif  ------------------------------------------------------------------------ -- Property Extraction
src/Hedgehog/Internal/Distributive.hs view
@@ -1,5 +1,4 @@ {-# OPTIONS_HADDOCK not-home #-}-{-# LANGUAGE CPP #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ScopedTypeVariables #-}
src/Hedgehog/Internal/Gen.hs view
@@ -12,6 +12,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-}@@ -21,6 +22,7 @@ #if __GLASGOW_HASKELL__ >= 806 {-# LANGUAGE DerivingVia #-} #endif+ module Hedgehog.Internal.Gen (   -- * Transformer     Gen@@ -107,6 +109,8 @@    -- ** Collections   , maybe+  , either+  , either_   , list   , seq   , nonEmpty@@ -174,8 +178,6 @@ import           Control.Monad.Trans.Control (MonadBaseControl(..)) import           Control.Monad.Catch (MonadThrow(..), MonadCatch(..)) import           Control.Monad.Error.Class (MonadError(..))-import           Control.Monad.Fail (MonadFail (..))-import qualified Control.Monad.Fail as Fail import           Control.Monad.IO.Class (MonadIO(..)) import           Control.Monad.Morph (MFunctor(..), MMonad(..)) import qualified Control.Monad.Morph as Morph@@ -199,9 +201,6 @@ import           Data.ByteString (ByteString) import qualified Data.ByteString as ByteString import qualified Data.Char as Char-#if __GLASGOW_HASKELL__ < 806-import           Data.Coerce (coerce)-#endif import           Data.Foldable (for_, toList) import           Data.Functor.Identity (Identity(..)) import           Data.Int (Int8, Int16, Int32, Int64)@@ -210,7 +209,6 @@ import           Data.Map (Map) import qualified Data.Map as Map import qualified Data.Maybe as Maybe-import           Data.Semigroup (Semigroup) import qualified Data.Semigroup as Semigroup import           Data.Sequence (Seq) import qualified Data.Sequence as Seq@@ -221,6 +219,7 @@ import           Data.Word (Word8, Word16, Word32, Word64)  import           Hedgehog.Internal.Distributive (MonadTransDistributive(..))+import           Hedgehog.Internal.Prelude hiding (either, maybe, seq) import           Hedgehog.Internal.Seed (Seed) import qualified Hedgehog.Internal.Seed as Seed import qualified Hedgehog.Internal.Shrink as Shrink@@ -229,8 +228,12 @@ import           Hedgehog.Range (Size, Range) import qualified Hedgehog.Range as Range -import           Prelude hiding (filter, print, maybe, map, seq)-+#if __GLASGOW_HASKELL__ < 808+import qualified Control.Monad.Fail as Fail+#endif+#if __GLASGOW_HASKELL__ < 806+import           Data.Coerce (coerce)+#endif  ------------------------------------------------------------------------ -- Generator transformer@@ -517,8 +520,7 @@           runGenT size sk . k =<<           runGenT size sm m -#if MIN_VERSION_base(4,13,0)-#else+#if __GLASGOW_HASKELL__ < 808   fail =     Fail.fail #endif@@ -666,12 +668,12 @@     lift . writer   tell =     lift . tell-  listen =-    undefined-    --mapGenT listen-  pass =-    undefined-    --mapGenT pass+  listen m =+    GenT $ \size seed ->+      listen $ runGenT size seed m+  pass m =+    GenT $ \size seed ->+      pass $ runGenT size seed m  instance MonadError e m => MonadError e (GenT m) where   throwError =@@ -1353,6 +1355,29 @@         (2, pure Nothing)       , (1 + fromIntegral n, Just <$> gen)       ]++-- | Generates either an 'a' or a 'b'.+--+--   As the size grows, this generator generates @Right@s more often than @Left@s.+--+either :: MonadGen m => m a -> m b -> m (Either a b)+either genA genB =+  sized $ \n ->+    frequency [+        (2, Left <$> genA)+      , (1 + fromIntegral n, Right <$> genB)+      ]++-- | Generates either an 'a' or a 'b', without bias.+--+--   This generator generates as many @Right@s as it does @Left@s.+--+either_ :: MonadGen m => m a -> m b -> m (Either a b)+either_ genA genB =+    choice [+      Left <$> genA+    , Right <$> genB+    ]  -- | Generates a list using a 'Range' to determine the length. --
+ src/Hedgehog/Internal/Prelude.hs view
@@ -0,0 +1,17 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# LANGUAGE NoImplicitPrelude #-}++-- | Mostly for compatibility across different base Prelude changes.+--+module Hedgehog.Internal.Prelude (+    Semigroup(..)+  , MonadFail+  , module Prelude+  ) where++import           Control.Monad.Fail (MonadFail)++import           Data.Semigroup (Semigroup(..))++import           Prelude hiding (filter, print, map)
src/Hedgehog/Internal/Property.hs view
@@ -12,6 +12,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -20,6 +21,7 @@ {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} -- Distributive+ module Hedgehog.Internal.Property (   -- * Property     Property(..)@@ -71,6 +73,7 @@   , (/==)    , eval+  , evalNF   , evalM   , evalIO   , evalEither@@ -122,12 +125,12 @@   ) where  import           Control.Applicative (Alternative(..))+import           Control.DeepSeq (NFData, rnf) import           Control.Monad (MonadPlus(..)) import           Control.Monad.Base (MonadBase(..)) import           Control.Monad.Catch (MonadThrow(..), MonadCatch(..)) import           Control.Monad.Catch (SomeException(..), displayException) import           Control.Monad.Error.Class (MonadError(..))-import           Control.Monad.Fail (MonadFail (..)) import qualified Control.Monad.Fail as Fail import           Control.Monad.IO.Class (MonadIO(..)) import           Control.Monad.Morph (MFunctor(..))@@ -152,13 +155,13 @@ import qualified Control.Monad.Trans.Writer.Strict as Strict  import qualified Data.Char as Char+import           Data.Functor (($>)) import           Data.Functor.Identity (Identity(..)) import           Data.Int (Int64) import           Data.Map (Map) import qualified Data.Map.Strict as Map import           Data.Number.Erf (invnormcdf) import qualified Data.List as List-import           Data.Semigroup (Semigroup(..)) import           Data.String (IsString) import           Data.Ratio ((%)) import           Data.Typeable (typeOf)@@ -167,11 +170,13 @@ import           Hedgehog.Internal.Exception import           Hedgehog.Internal.Gen (Gen, GenT) import qualified Hedgehog.Internal.Gen as Gen+import           Hedgehog.Internal.Prelude import           Hedgehog.Internal.Show import           Hedgehog.Internal.Source  import           Language.Haskell.TH.Syntax (Lift) + ------------------------------------------------------------------------  -- | A property test, along with some configurable limits like how many times@@ -700,9 +705,17 @@ --   message. -- failException :: (MonadTest m, HasCallStack) => SomeException -> m a-failException (SomeException x) =+failException x =   withFrozenCallStack $-    failWith Nothing $ unlines [+    failExceptionWith [] x++-- | Fails with an error which renders the given messages, the type of an exception,+--   and its error message.+--+failExceptionWith :: (MonadTest m, HasCallStack) => [String] -> SomeException -> m a+failExceptionWith messages (SomeException x) =+  withFrozenCallStack+    failWith Nothing $ unlines $ messages <> [         "━━━ Exception (" ++ show (typeOf x) ++ ") ━━━"       , List.dropWhileEnd Char.isSpace (displayException x)       ]@@ -779,6 +792,17 @@ eval x =   either (withFrozenCallStack failException) pure (tryEvaluate x) +-- | Fails the test if the value throws an exception when evaluated to+--   normal form (NF).+--+evalNF :: (MonadTest m, NFData a, HasCallStack) => a -> m a+evalNF x =+  let+    messages =+      ["━━━ Value could not be evaluated to normal form ━━━"]+  in+    either (withFrozenCallStack (failExceptionWith messages)) pure (tryEvaluate (rnf x)) $> x+ -- | Fails the test if the action throws an exception. -- --   /The benefit of using this over simply letting the exception bubble up is/@@ -1107,7 +1131,7 @@  coverageFailures :: TestCount -> Coverage CoverCount -> [Label CoverCount] coverageFailures tests (Coverage kvs) =-  filter (not . labelCovered tests) (Map.elems kvs)+  List.filter (not . labelCovered tests) (Map.elems kvs)  -- | Is true when the test coverage satisfies the specified 'Confidence' --   contstraint for all 'Coverage CoverCount's
src/Hedgehog/Internal/Report.hs view
@@ -6,6 +6,7 @@ {-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} @@ -45,14 +46,14 @@ import           Data.Map (Map) import qualified Data.Map as Map import           Data.Maybe (mapMaybe, catMaybes)-import           Data.Semigroup (Semigroup(..)) import           Data.Traversable (for)  import           Hedgehog.Internal.Config import           Hedgehog.Internal.Discovery (Pos(..), Position(..)) import qualified Hedgehog.Internal.Discovery as Discovery-import           Hedgehog.Internal.Property (Coverage(..), Label(..), LabelName(..))+import           Hedgehog.Internal.Prelude import           Hedgehog.Internal.Property (CoverCount(..), CoverPercentage(..))+import           Hedgehog.Internal.Property (Coverage(..), Label(..), LabelName(..)) import           Hedgehog.Internal.Property (PropertyName(..), Log(..), Diff(..)) import           Hedgehog.Internal.Property (ShrinkCount(..), PropertyCount(..)) import           Hedgehog.Internal.Property (TestCount(..), DiscardCount(..))@@ -608,25 +609,34 @@  ppFailureReport :: MonadIO m => Maybe PropertyName -> TestCount -> FailureReport -> m [Doc Markup] ppFailureReport name tests (FailureReport size seed _ mcoverage inputs0 mlocation0 msg mdiff msgs0) = do+  let+    basic =+      -- Move the failure message to the end section if we have+      -- no source location or can't find the source file.+      let+        msgs1 =+          msgs0 +++          (if null msg then [] else [msg])++        docs =+          concatMap ppTextLines msgs1 +++          maybe [] ppDiff mdiff+      in+        (docs, Nothing)+   (msgs1, mlocation) <-     case mlocation0 of       Nothing ->-        -- Move the failure message to the end section if we have-        -- no source location.-        let-          msgs1 =-            msgs0 ++-            (if null msg then [] else [msg])--          docs =-            concatMap ppTextLines msgs1 ++-            maybe [] ppDiff mdiff-        in-          pure (docs, Nothing)+        return basic -      Just location0 ->-        fmap (concatMap ppTextLines msgs0,) $+      Just location0 -> do+        mAdvanced <-           ppFailureLocation (fmap WL.text $ List.lines msg) mdiff location0+        case mAdvanced of+          Just advanced ->+            return (concatMap ppTextLines msgs0, Just advanced)+          Nothing ->+            return basic    coverageLocations <-     case mcoverage of@@ -678,7 +688,7 @@     WL.punctuate WL.line .     fmap (WL.vsep . fmap (WL.indent 2)) .     fmap (id :: [Doc Markup] -> [Doc Markup]) .-    filter (not . null) $+    List.filter (not . null) $     concat [       with args $         WL.punctuate WL.line
src/Hedgehog/Internal/Runner.hs view
@@ -5,8 +5,10 @@ {-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-}+ module Hedgehog.Internal.Runner (   -- * Running Individual Properties     check@@ -29,20 +31,19 @@ import           Control.Monad.Catch (MonadCatch(..), catchAll) import           Control.Monad.IO.Class (MonadIO(..)) -import           Data.Semigroup ((<>))- import           Hedgehog.Internal.Config import           Hedgehog.Internal.Gen (evalGenT)+import           Hedgehog.Internal.Prelude import           Hedgehog.Internal.Property (DiscardCount(..), ShrinkCount(..)) import           Hedgehog.Internal.Property (Group(..), GroupName(..)) import           Hedgehog.Internal.Property (Journal(..), Coverage(..), CoverCount(..)) import           Hedgehog.Internal.Property (Property(..), PropertyConfig(..), PropertyName(..)) import           Hedgehog.Internal.Property (PropertyT(..), Failure(..), runTestT) import           Hedgehog.Internal.Property (ShrinkLimit, ShrinkRetries, withTests)-import           Hedgehog.Internal.Property (TestCount(..), PropertyCount(..)) import           Hedgehog.Internal.Property (TerminationCriteria(..))-import           Hedgehog.Internal.Property (coverageSuccess, journalCoverage)+import           Hedgehog.Internal.Property (TestCount(..), PropertyCount(..)) import           Hedgehog.Internal.Property (confidenceSuccess, confidenceFailure)+import           Hedgehog.Internal.Property (coverageSuccess, journalCoverage) import           Hedgehog.Internal.Property (defaultMinTests) import           Hedgehog.Internal.Queue import           Hedgehog.Internal.Region
src/Hedgehog/Internal/Source.hs view
@@ -1,6 +1,5 @@ {-# OPTIONS_HADDOCK not-home #-} {-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE RankNTypes #-}
src/Hedgehog/Internal/State.hs view
@@ -1,5 +1,4 @@ {-# OPTIONS_HADDOCK not-home #-}-{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-}
src/Hedgehog/Internal/Tree.hs view
@@ -11,6 +11,9 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} -- MonadBase+#if __GLASGOW_HASKELL__ < 802+{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}+#endif module Hedgehog.Internal.Tree (     Tree   , pattern Tree@@ -86,7 +89,9 @@ pattern Tree :: NodeT Identity a -> Tree a pattern Tree node =   TreeT (Identity node)+#if __GLASGOW_HASKELL__ >= 802 {-# COMPLETE Tree #-}+#endif  -- | An effectful tree, each node in the tree can have an effect before it is --   produced.@@ -105,7 +110,9 @@ -- type Node =   NodeT Identity+#if __GLASGOW_HASKELL__ >= 802 {-# COMPLETE Node #-}+#endif  -- | Pattern to ease construction / deconstruction of pure nodes. --@@ -330,12 +337,31 @@   in     go (List.inits xs0) xs0 -dropOne :: Monad m => [NodeT m a] -> [TreeT m [a]]-dropOne ts = do-  (xs, _y, zs) <- splits ts-  pure . TreeT . pure $-    interleave (xs ++ zs)+-- | @removes n@ computes all ways we can remove chunks of size @n@ from a list+--+-- Examples+--+-- > removes 1 [1..3] == [[2,3],[1,3],[1,2]]+-- > removes 2 [1..4] == [[3,4],[1,2]]+-- > removes 2 [1..5] == [[3,4,5],[1,2,5],[1,2,3,4]]+-- > removes 3 [1..5] == [[4,5],[1,2,3]]+--+-- Note that the last chunk we delete might have fewer elements than @n@.+removes :: forall a. Int -> [a] -> [[a]]+removes k = \xs -> go xs+  where+    go :: [a] -> [[a]]+    go [] = []+    go xs = xs2 : map (xs1 ++) (go xs2)+      where+        (xs1, xs2) = splitAt k xs +dropSome :: Monad m => [NodeT m a] -> [TreeT m [a]]+dropSome ts = do+  n   <- takeWhile (> 0) $ iterate (`div` 2) (length ts)+  ts' <- removes n ts+  pure . TreeT . pure $ interleave ts'+ shrinkOne :: Monad m => [NodeT m a] -> [TreeT m [a]] shrinkOne ts = do   (xs, y0, zs) <- splits ts@@ -349,7 +375,7 @@ interleave ts =   NodeT (fmap nodeValue ts) $     concat [-        dropOne ts+        dropSome ts       , shrinkOne ts       ] 
src/Hedgehog/Main.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} module Hedgehog.Main (   -- * Running tests     defaultMain