packages feed

tasty 1.4.2 → 1.4.2.1

raw patch · 6 files changed

+49/−32 lines, 6 filesdep ~base

Dependency ranges changed: base

Files

CHANGELOG.md view
@@ -1,6 +1,11 @@ Changes ======= +Version 1.4.2.1+---------------++Fix warnings under GHC 9.2+ Version 1.4.2 ------------- 
README.md view
@@ -797,6 +797,12 @@      See [issue #152](https://github.com/UnkindPartition/tasty/issues/152). +3. **Q**: Patterns with slashes do not work on Windows. How can I fix it?+  +   **A**: If you are running Git for Windows terminal, it has a habit of converting slashes +   to backslashes. Set `MSYS_NO_PATHCONV=1` to prevent this behaviour, or follow other +   suggestions from [Known Issues](https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md#known-issues).+    ## Press  Blog posts and other publications related to tasty. If you wrote or just found
Test/Tasty/Ingredients/ConsoleReporter.hs view
@@ -52,13 +52,12 @@ import Data.List (isInfixOf) import Data.Maybe import Data.Monoid (Any(..))+import qualified Data.Semigroup as Sem import Data.Typeable import Options.Applicative hiding (action, str, Success, Failure) import System.IO import System.Console.ANSI #if !MIN_VERSION_base(4,11,0)-import Data.Semigroup (Semigroup)-import qualified Data.Semigroup (Semigroup((<>))) import Data.Monoid import Data.Foldable (foldMap) #endif@@ -87,11 +86,13 @@  -- The monoid laws should hold observationally w.r.t. the semantics defined -- in this module+instance Sem.Semigroup TestOutput where+  (<>) = Seq instance Monoid TestOutput where   mempty = Skip-  mappend = Seq-instance Semigroup TestOutput where-  (<>) = mappend+#if !MIN_VERSION_base(4,11,0)+  mappend = (Sem.<>)+#endif  applyHook :: ([TestName] -> Result -> IO Result) -> TestOutput -> TestOutput applyHook hook = go []@@ -294,11 +295,13 @@   , statFailures :: !Int -- ^ Number of active tests that failed.   } +instance Sem.Semigroup Statistics where+  Statistics t1 f1 <> Statistics t2 f2 = Statistics (t1 + t2) (f1 + f2) instance Monoid Statistics where-  Statistics t1 f1 `mappend` Statistics t2 f2 = Statistics (t1 + t2) (f1 + f2)   mempty = Statistics 0 0-instance Semigroup Statistics where-  (<>) = mappend+#if !MIN_VERSION_base(4,11,0)+  mappend = (Sem.<>)+#endif  -- | @computeStatistics@ computes a summary 'Statistics' for -- a given state of the 'StatusMap'.@@ -638,14 +641,15 @@   = Maximum a   | MinusInfinity +instance Ord a => Sem.Semigroup (Maximum a) where+  Maximum a <> Maximum b = Maximum (a `max` b)+  MinusInfinity <> a = a+  a <> MinusInfinity = a instance Ord a => Monoid (Maximum a) where   mempty = MinusInfinity--  Maximum a `mappend` Maximum b = Maximum (a `max` b)-  MinusInfinity `mappend` a = a-  a `mappend` MinusInfinity = a-instance Ord a => Semigroup (Maximum a) where-  (<>) = mappend+#if !MIN_VERSION_base(4,11,0)+  mappend = (Sem.<>)+#endif  -- | Compute the amount of space needed to align \"OK\"s and \"FAIL\"s computeAlignment :: OptionSet -> TestTree -> Int
Test/Tasty/Options.hs view
@@ -33,13 +33,10 @@ import Data.Typeable import Data.Monoid import Data.Foldable+import qualified Data.Semigroup as Sem import qualified Data.Set as S import Prelude hiding (mod) -- Silence FTP import warnings import Options.Applicative-#if !MIN_VERSION_base(4,11,0)-import Data.Semigroup (Semigroup)-import qualified Data.Semigroup (Semigroup((<>)))-#endif  -- | An option is a data type that inhabits the `IsOption` type class. class Typeable v => IsOption v where@@ -98,12 +95,14 @@ newtype OptionSet = OptionSet (Map TypeRep OptionValue)  -- | Later options override earlier ones+instance Sem.Semigroup OptionSet where+  OptionSet a <> OptionSet b =+    OptionSet $ Map.unionWith (flip const) a b instance Monoid OptionSet where   mempty = OptionSet mempty-  OptionSet a `mappend` OptionSet b =-    OptionSet $ Map.unionWith (flip const) a b-instance Semigroup OptionSet where-  (<>) = mappend+#if !MIN_VERSION_base(4,11,0)+  mappend = (Sem.<>)+#endif  -- | Set the option value setOption :: IsOption v => v -> OptionSet -> OptionSet
Test/Tasty/Runners/Reducers.hs view
@@ -43,19 +43,20 @@  import Control.Applicative import Prelude  -- Silence AMP import warnings+import qualified Data.Semigroup as Sem #if !MIN_VERSION_base(4,11,0)-import Data.Semigroup (Semigroup)-import qualified Data.Semigroup (Semigroup((<>))) import Data.Monoid #endif  -- | Monoid generated by '*>' newtype Traversal f = Traversal { getTraversal :: f () }+instance Applicative f => Sem.Semigroup (Traversal f) where+  Traversal f1 <> Traversal f2 = Traversal $ f1 *> f2 instance Applicative f => Monoid (Traversal f) where   mempty = Traversal $ pure ()-  Traversal f1 `mappend` Traversal f2 = Traversal $ f1 *> f2-instance Applicative f => Semigroup (Traversal f) where-  (<>) = mappend+#if !MIN_VERSION_base(4,11,0)+  mappend = (Sem.<>)+#endif  -- | Monoid generated by @'liftA2' ('<>')@ --@@ -63,8 +64,10 @@ -- This type is nevertheless kept for compatibility. newtype Ap f a = Ap { getApp :: f a }   deriving (Functor, Applicative, Monad)+instance (Applicative f, Monoid a) => Sem.Semigroup (Ap f a) where+  (<>) = liftA2 mappend instance (Applicative f, Monoid a) => Monoid (Ap f a) where   mempty = pure mempty-  mappend = liftA2 mappend-instance (Applicative f, Monoid a) => Semigroup (Ap f a) where-  (<>) = mappend+#if !MIN_VERSION_base(4,11,0)+  mappend = (Sem.<>)+#endif
tasty.cabal view
@@ -2,7 +2,7 @@ --  see http://haskell.org/cabal/users-guide/  name:                tasty-version:             1.4.2+version:             1.4.2.1 synopsis:            Modern and extensible testing framework description:         Tasty is a modern testing framework for Haskell.                      It lets you combine your unit tests, golden@@ -90,4 +90,4 @@   -- hs-source-dirs:   default-language:    Haskell2010   default-extensions:  CPP, ScopedTypeVariables, DeriveDataTypeable-  ghc-options: -Wall+  ghc-options: -Wall -Wno-incomplete-uni-patterns