From c4231e1423e5c81f2779acf4462eea8872f6a4e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Sicard-Ram=C3=ADrez?= Date: Sun, 7 Jan 2018 23:52:32 -0500 Subject: [PATCH] Added Semigroup instance. The instance was required by GHC 8.4.1-alpha1. --- src/Control/Monad/Plus.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Control/Monad/Plus.hs b/src/Control/Monad/Plus.hs index 25f4782..a4af848 100644 --- a/src/Control/Monad/Plus.hs +++ b/src/Control/Monad/Plus.hs @@ -1,5 +1,5 @@ -{-# LANGUAGE DeriveFunctor, DeriveFoldable, GeneralizedNewtypeDeriving #-} +{-# LANGUAGE CPP, DeriveFunctor, DeriveFoldable, GeneralizedNewtypeDeriving #-} ------------------------------------------------------------------------------------- -- | @@ -261,8 +261,13 @@ instance Category Partial where y <- g x f y +#if MIN_VERSION_base(4,11,0) +instance Semigroup (Partial a b) where + (<>) = mplus +#endif + instance Monoid (Partial a b) where mempty = mzero +#if !MIN_VERSION_base(4,11,0) mappend = mplus - - +#endif