hspec-meta 2.11.8 → 2.11.9
raw patch · 5 files changed
+7/−83 lines, 5 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- hspec-core/src/Test/Hspec/Core/Compat.hs +1/−73
- hspec-core/src/Test/Hspec/Core/Example.hs +2/−2
- hspec-core/src/Test/Hspec/Core/Example/Location.hs +0/−4
- hspec-core/src/Test/Hspec/Core/Tree.hs +1/−1
- hspec-meta.cabal +3/−3
hspec-core/src/Test/Hspec/Core/Compat.hs view
@@ -18,7 +18,7 @@ ) import Data.Maybe as Imports import Data.Foldable as Imports-import Data.CallStack as Imports (HasCallStack)+import GHC.Stack as Imports (HasCallStack, withFrozenCallStack) import System.IO import System.Exit@@ -74,76 +74,14 @@ import Data.Char #endif -#if MIN_VERSION_base(4,6,0) import Text.Read as Imports (readMaybe) import System.Environment as Imports (lookupEnv)-#else-import Text.Read-import qualified Text.ParserCombinators.ReadP as P-#endif -#if !MIN_VERSION_base(4,8,0)-import Data.Ord (comparing)-#endif -#if MIN_VERSION_base(4,7,0) import Data.Bool as Imports (bool)-#endif import Control.Concurrent -#if !MIN_VERSION_base(4,9,0)-import GHC.IO-#endif--#if !MIN_VERSION_base(4,6,0)-forkFinally :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadId-forkFinally action and_then =- mask $ \restore ->- forkIO $ try (restore action) >>= and_then---- |Strict version of 'modifyIORef'-modifyIORef' :: IORef a -> (a -> a) -> IO ()-modifyIORef' ref f = do- x <- readIORef ref- let x' = f x- x' `seq` writeIORef ref x'--atomicWriteIORef :: IORef a -> a -> IO ()-atomicWriteIORef ref a = do- x <- atomicModifyIORef ref (\_ -> (a, ()))- x `seq` pass---- | Parse a string using the 'Read' instance.--- Succeeds if there is exactly one valid result.--- A 'Left' value indicates a parse error.-readEither :: Read a => String -> Either String a-readEither s =- case [ x | (x,"") <- readPrec_to_S read' minPrec s ] of- [x] -> Right x- [] -> Left "Prelude.read: no parse"- _ -> Left "Prelude.read: ambiguous parse"- where- read' =- do x <- readPrec- lift P.skipSpaces- return x---- | Parse a string using the 'Read' instance.--- Succeeds if there is exactly one valid result.-readMaybe :: Read a => String -> Maybe a-readMaybe s = case readEither s of- Left _ -> Nothing- Right a -> Just a---- | Return the value of the environment variable @var@, or @Nothing@ if--- there is no such value.------ For POSIX users, this is equivalent to 'System.Posix.Env.getEnv'.-lookupEnv :: String -> IO (Maybe String)-lookupEnv k = lookup k `fmap` getEnvironment-#endif- showType :: Typeable a => a -> String showType a = let t = typeRepTyCon (typeOf a) in show t@@ -154,16 +92,6 @@ getDefaultConcurrentJobs :: IO Int getDefaultConcurrentJobs = getNumCapabilities--#if !MIN_VERSION_base(4,9,0)-interruptible :: IO a -> IO a-interruptible act = do- st <- getMaskingState- case st of- Unmasked -> act- MaskedInterruptible -> unsafeUnmask act- MaskedUninterruptible -> act-#endif guarded :: Alternative m => (a -> Bool) -> a -> m a guarded p a = if p a then pure a else empty
hspec-core/src/Test/Hspec/Core/Example.hs view
@@ -103,7 +103,7 @@ Failure _ m -> m `deepseq` r safeEvaluateExample :: Example e => e -> Params -> (ActionWith (Arg e) -> IO ()) -> ProgressCallback -> IO Result-safeEvaluateExample example params around progress = safeEvaluate $ evaluateExample example params around progress+safeEvaluateExample example params around = safeEvaluate . evaluateExample example params around safeEvaluate :: IO Result -> IO Result safeEvaluate action = do@@ -180,4 +180,4 @@ instance Example (a -> Expectation) where type Arg (a -> Expectation) = a- evaluateExample e _ hook _ = hook e >> return (Result "" Success)+ evaluateExample e _params hook _ = hook e >> return (Result "" Success)
hspec-core/src/Test/Hspec/Core/Example/Location.hs view
@@ -54,12 +54,8 @@ locationFromErrorCall :: SomeException -> Maybe Location locationFromErrorCall e = case fromException e of-#if MIN_VERSION_base(4,9,0) Just (ErrorCallWithLocation err loc) -> parseCallStack loc <|>-#else- Just (ErrorCall err) ->-#endif fromPatternMatchFailureInDoExpression err Nothing -> Nothing
hspec-core/src/Test/Hspec/Core/Tree.hs view
@@ -111,7 +111,7 @@ -- parallel with other spec items , itemIsParallelizable :: Maybe Bool - -- | A flag that indicates whether this spec item is focused.+ -- | A flag that indicates whether this spec item is focused , itemIsFocused :: Bool -- | Example for behavior
hspec-meta.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: hspec-meta-version: 2.11.8+version: 2.11.9 synopsis: A version of Hspec which is used to test Hspec itself description: A stable version of Hspec which is used to test the in-development version of Hspec.@@ -91,7 +91,7 @@ , QuickCheck >=2.13.1 && <2.16 , ansi-terminal >=0.6.2 , array- , base >=4.8.2.0 && <5+ , base >=4.9.0.0 && <5 , call-stack >=0.2.0 , deepseq , directory@@ -130,7 +130,7 @@ , QuickCheck >=2.13.1 && <2.16 , ansi-terminal >=0.6.2 , array- , base >=4.8.2.0 && <5+ , base >=4.9.0.0 && <5 , call-stack >=0.2.0 , deepseq , directory