diff options
author | Benjamin Barenblat <bbarenblat@gmail.com> | 2022-01-19 13:11:40 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbarenblat@gmail.com> | 2022-01-19 13:31:05 -0500 |
commit | a9b9e5d0d72c2348580dbac5533b89a45abd8938 (patch) | |
tree | 0f8113e86df43616baec8570b07acb1537497885 /Types/Test.hs | |
parent | c79473051a8e1647b14f351b72768b74301acc33 (diff) |
Deal with the Semigroup/Monoid proposal
base-4.11 made Semigroup a superclass of Monoid. Provide Semigroup
implementations for Monoids.
Diffstat (limited to 'Types/Test.hs')
-rw-r--r-- | Types/Test.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Types/Test.hs b/Types/Test.hs index 50c460f50..0179474b4 100644 --- a/Types/Test.hs +++ b/Types/Test.hs @@ -1,6 +1,7 @@ {- git-annex test data types. - - Copyright 2011-2017 Joey Hess <id@joeyh.name> + - Copyright 2022 Benjamin Barenblat <bbarenblat@gmail.com> - - Licensed under the GNU GPL version 3 or higher. -} @@ -19,13 +20,15 @@ data TestOptions = TestOptions , internalData :: CmdParams } -instance Monoid TestOptions where - mempty = TestOptions mempty False False mempty - mappend a b = TestOptions +instance Semigroup TestOptions where + a <> b = TestOptions (tastyOptionSet a <> tastyOptionSet b) (keepFailuresOption a || keepFailuresOption b) (fakeSsh a || fakeSsh b) (internalData a <> internalData b) +instance Monoid TestOptions where + mempty = TestOptions mempty False False mempty + type TestRunner = TestOptions -> IO () |