packages feed

hspec-core 2.3.0 → 2.3.1

raw patch · 3 files changed

+10/−47 lines, 3 filesdep ~basedep ~hspec-meta

Dependency ranges changed: base, hspec-meta

Files

hspec-core.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:             hspec-core-version:          2.3.0+version:          2.3.1 license:          MIT license-file:     LICENSE copyright:        (c) 2011-2015 Simon Hengel,@@ -29,7 +29,7 @@       src   ghc-options: -Wall   build-depends:-      base >= 4.3 && < 5+      base >= 4.5.0.0 && < 5     , random     , tf-random     , setenv@@ -73,7 +73,7 @@       src   ghc-options: -Wall   build-depends:-      base >= 4.3 && < 5+      base >= 4.5.0.0 && < 5     , random     , tf-random     , setenv@@ -87,7 +87,7 @@     , hspec-expectations == 0.8.0.*     , async >= 2     , call-stack-    , hspec-meta >= 2.3.0+    , hspec-meta >= 2.3.1     , silently >= 1.2.4     , process   other-modules:
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
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.