We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a76be76 commit cc25530Copy full SHA for cc25530
Data/Text/Format/Types/Internal.hs
@@ -1,4 +1,4 @@
1
-{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE CPP, DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
2
3
-- |
4
-- Module : Data.Text.Format.Types.Internal
@@ -47,8 +47,13 @@ newtype Format = Format { fromFormat :: Text }
47
deriving (Eq, Ord, Typeable, Show)
48
49
instance Monoid Format where
50
- Format a `mappend` Format b = Format (a `mappend` b)
51
mempty = Format mempty
+#if !MIN_VERSION_base(4,11,0)
52
+ Format a `mappend` Format b = Format (a `mappend` b)
53
+#else
54
+instance Semigroup Format where
55
+ Format a <> Format b = Format (a <> b)
56
+#endif
57
58
instance IsString Format where
59
fromString = Format . fromString
0 commit comments