Permalink
Browse files

Import <> from Data.Monoid when base >= 4.5

Bumped version from 0.6.0.2 to 0.6.0.3 because of this internal change.
  • Loading branch information...
1 parent 28972fc commit 177b828620656b6f9221d84b7ed25035fae72cb2 @basvandijk committed Jan 30, 2012
Showing with 12 additions and 8 deletions.
  1. +11 −7 Data/String/Combinators.hs
  2. +1 −1 string-combinators.cabal
View
@@ -77,23 +77,28 @@ import Data.Function ( id )
import Data.Int ( Int )
import Data.Ratio ( Rational )
import Data.String ( IsString, fromString )
-import Data.Monoid ( Monoid, mempty, mappend )
+import Data.Monoid ( Monoid, mempty )
import Text.Show ( Show, show )
import Prelude ( Integer, Float, Double )
-- from base-unicode-symbols
import Data.Function.Unicode ( (∘) )
-
---------------------------------------------------------------------------------
--- * Combining
---------------------------------------------------------------------------------
-
+#if MIN_VERSION_base(4,5,0)
+import Data.Monoid ( (<>) )
+#else
+import Data.Monoid ( mappend )
-- | Put two string-likes besides eachother.
--
-- Note that: @'<>' = 'mappend'@.
(<>) Monoid s s s s
(<>) = mappend
+infixl 6 <>
+#endif
+
+--------------------------------------------------------------------------------
+-- * Combining
+--------------------------------------------------------------------------------
-- | @mid m x y@ Puts @x@ and @y@ around @m@.
--
@@ -109,7 +114,6 @@ mid m x y = between x y m
($$) (Monoid s, IsString s) s s s
($$) = mid newline
-infixl 6 <>
infixl 6 <+>
infixl 5 $$
View
@@ -1,5 +1,5 @@
Name: string-combinators
-Version: 0.6.0.2
+Version: 0.6.0.3
Synopsis: Polymorphic functions to build and combine stringlike values
Description: @string-combinators@ provides handy polymorphic functions
to build and combine string-like values.

0 comments on commit 177b828

Please sign in to comment.