Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Define the <> syn for mappend so as to build with base < 4.5.

  • Loading branch information...
commit 916bd78f1ba70edfcb1165e53f857f85b4d02918 1 parent c7dfb60
Matthew Sorensen authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 Graphics/Implicit/Export/TextBuilderUtils.hs
12 Graphics/Implicit/Export/TextBuilderUtils.hs
View
@@ -24,7 +24,9 @@ module Graphics.Implicit.Export.TextBuilderUtils
) where
import Data.Text.Lazy
-import Data.Monoid
+-- We manually redefine this operator to avoid a dependency on base >= 4.5
+-- This will become unnecessary later.
+import Data.Monoid hiding ((<>))
import Data.Text.Lazy
import Data.Text.Lazy.Builder
@@ -42,4 +44,10 @@ buildFloat = formatRealFloat Fixed Nothing
buildTruncFloat = formatRealFloat Fixed $ Just 4
buildInt :: Int -> Builder
-buildInt = decimal
+buildInt = decimal
+
+-- This is directly copied from base 4.5.1.0
+infixr 6 <>
+(<>) :: Monoid m => m -> m -> m
+(<>) = mappend
+{-# INLINE (<>) #-}
Please sign in to comment.
Something went wrong with that request. Please try again.