hspec-meta 2.3.0 → 2.3.1
raw patch · 4 files changed
+7/−46 lines, 4 filesdep ~HUnitdep ~hspec-expectationsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: HUnit, hspec-expectations
API changes (from Hackage documentation)
Files
- hspec-core/src/Test/Hspec/Compat.hs +3/−24
- hspec-core/src/Test/Hspec/Core/Tree.hs +3/−19
- hspec-meta.cabal +1/−1
- src/Test/Hspec/QuickCheck.hs +0/−2
hspec-core/src/Test/Hspec/Compat.hs view
@@ -46,32 +46,17 @@ , sum ) -#if !MIN_VERSION_base(4,3,0)-import Control.Monad.Trans.Error () -- for Monad (Either e)-#endif- import Data.Typeable (Typeable, typeOf, typeRepTyCon) import Text.Read import Data.IORef import System.Environment -#if MIN_VERSION_base(4,4,0) import Data.Typeable.Internal (tyConModule, tyConName) import Control.Concurrent-#endif #if !MIN_VERSION_base(4,6,0) import qualified Text.ParserCombinators.ReadP as P-#endif -getDefaultConcurrentJobs :: IO Int-#if MIN_VERSION_base(4,4,0)-getDefaultConcurrentJobs = getNumCapabilities-#else-getDefaultConcurrentJobs = return 1-#endif--#if !MIN_VERSION_base(4,6,0) -- |Strict version of 'modifyIORef' modifyIORef' :: IORef a -> (a -> a) -> IO () modifyIORef' ref f = do@@ -111,17 +96,11 @@ showType :: Typeable a => a -> String showType a = let t = typeRepTyCon (typeOf a) in-#if MIN_VERSION_base(4,4,0) show t-#else- (reverse . takeWhile (/= '.') . reverse . show) t-#endif - showFullType :: Typeable a => a -> String showFullType a = let t = typeRepTyCon (typeOf a) in-#if MIN_VERSION_base(4,4,0) tyConModule t ++ "." ++ tyConName t-#else- show t-#endif++getDefaultConcurrentJobs :: IO Int+getDefaultConcurrentJobs = getNumCapabilities
hspec-core/src/Test/Hspec/Core/Tree.hs view
@@ -1,4 +1,6 @@ {-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE DeriveFoldable #-}+{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ConstraintKinds #-} @@ -24,25 +26,7 @@ Node String [Tree c a] | NodeWithCleanup c [Tree c a] | Leaf a- deriving Functor--instance Foldable (Tree c) where -- Note: GHC 7.0.1 fails to derive this instance- foldMap = go- where- go :: Monoid m => (a -> m) -> Tree c a -> m- go f t = case t of- Node _ xs -> foldMap (foldMap f) xs- NodeWithCleanup _ xs -> foldMap (foldMap f) xs- Leaf x -> f x--instance Traversable (Tree c) where -- Note: GHC 7.0.1 fails to derive this instance- sequenceA = go- where- go :: Applicative f => Tree c (f a) -> f (Tree c a)- go t = case t of- Node label xs -> Node label <$> sequenceA (map go xs)- NodeWithCleanup action xs -> NodeWithCleanup action <$> sequenceA (map go xs)- Leaf a -> Leaf <$> a+ deriving (Functor, Foldable, Traversable) -- | A tree is used to represent a spec internally. The tree is parametrize -- over the type of cleanup actions and the type of the actual spec items.
hspec-meta.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack name: hspec-meta-version: 2.3.0+version: 2.3.1 license: MIT license-file: LICENSE copyright: (c) 2011-2015 Simon Hengel,
src/Test/Hspec/QuickCheck.hs view
@@ -10,8 +10,6 @@ , prop ) where -import Data.CallStack- import Test.Hspec import Test.QuickCheck import Test.Hspec.Core.QuickCheck