[commit: ghc] master: testsuite: Semigroup/Monoid compat for T3001-2 (8c9906c)
git at git.haskell.org
git at git.haskell.org
Mon Dec 18 16:32:47 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/8c9906c5ce3f9ebd6417a1cdbe3e2a007c4cccd0/ghc
>---------------------------------------------------------------
commit 8c9906c5ce3f9ebd6417a1cdbe3e2a007c4cccd0
Author: Ben Gamari <ben at smart-cactus.org>
Date: Thu Dec 14 17:26:43 2017 -0500
testsuite: Semigroup/Monoid compat for T3001-2
>---------------------------------------------------------------
8c9906c5ce3f9ebd6417a1cdbe3e2a007c4cccd0
testsuite/tests/profiling/should_run/T3001-2.hs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/testsuite/tests/profiling/should_run/T3001-2.hs b/testsuite/tests/profiling/should_run/T3001-2.hs
index 5a84dcc..17fa0c9 100644
--- a/testsuite/tests/profiling/should_run/T3001-2.hs
+++ b/testsuite/tests/profiling/should_run/T3001-2.hs
@@ -7,7 +7,7 @@
module Main (main) where
-import Data.Monoid
+import Data.Semigroup
import Data.ByteString.Internal (inlinePerformIO)
@@ -284,6 +284,9 @@ flush = Builder $ \ k buf@(Buffer p o u l) ->
emptyBuilder :: Builder
emptyBuilder = Builder id
+instance Semigroup Builder where
+ (<>) = append
+
instance Monoid Builder where
mempty = emptyBuilder
mappend = append
More information about the ghc-commits
mailing list