From a9b9e5d0d72c2348580dbac5533b89a45abd8938 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Wed, 19 Jan 2022 13:11:40 -0500 Subject: Deal with the Semigroup/Monoid proposal base-4.11 made Semigroup a superclass of Monoid. Provide Semigroup implementations for Monoids. --- Types/Test.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Types/Test.hs') 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 + - Copyright 2022 Benjamin Barenblat - - 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 () -- cgit v1.2.3