From 429f22944b7634b8789cb3805292bcc2b23e3e9f Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sun, 7 Oct 2018 21:05:57 +0200 Subject: [PATCH] fix for base 4.11 --- src/Scat/Builder.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Scat/Builder.hs b/src/Scat/Builder.hs index 49caa25..e6d471f 100644 --- a/src/Scat/Builder.hs +++ b/src/Scat/Builder.hs @@ -71,9 +71,11 @@ instance Monad Builder where let (n', v) = runBuilder x n in runBuilder (f v) n' +instance Semigroup a => Semigroup (Builder a) where + a <> b = (<>) <$> a <*> b + instance Monoid a => Monoid (Builder a) where mempty = return mempty - mappend a b = mappend <$> a <*> b -- | Returns a positive integer less than `i`. lessThan :: Integral a => a -> Builder a