Skip to content

Commit ff54823

Browse files
committed
compatibility with >=base-4.11
1 parent 69d4bf5 commit ff54823

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Graphics/Matplotlib/Internal.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE FlexibleInstances, ScopedTypeVariables, FlexibleContexts, ExtendedDefaultRules, ExistentialQuantification #-}
1+
{-# LANGUAGE FlexibleInstances, ScopedTypeVariables, FlexibleContexts, ExtendedDefaultRules, ExistentialQuantification, CPP #-}
22
-- |
33
-- Internal representations of the Matplotlib data. These are not API-stable
44
-- and may change. You can easily extend the provided bindings without relying
@@ -35,7 +35,12 @@ data Matplotlib = Matplotlib {
3535
-- | Monoid instance for Matplotlib type
3636
instance Monoid Matplotlib where
3737
mempty = mp
38+
#if !MIN_VERSION_base(4,11,0)
3839
mappend = (%)
40+
#else
41+
instance Semigroup Matplotlib where
42+
(<>) = (%)
43+
#endif
3944

4045
instance NFData Matplotlib where
4146
rnf (Matplotlib cs po re) = rnf cs `seq` rnf po `seq` rnf re

0 commit comments

Comments
 (0)