Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

GHC 7.2 compatibility

--HG--
extra : amend_source : 6eaa96f11b7e5d106435ef50b6b1ab519d21fffe
  • Loading branch information...
commit 92a2aa670d77f0acc6ad48a500dba9aee486a9ed 1 parent f028c02
@bos authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 tests/Properties.hs
View
12 tests/Properties.hs
@@ -1,10 +1,10 @@
+{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Properties (tests) where
import Control.Applicative ((<$>))
import Criterion.Analysis
-import Data.Monoid ((<>))
import Statistics.Types (Sample)
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
@@ -12,6 +12,16 @@ import Test.QuickCheck
import qualified Data.Vector.Generic as G
import qualified Data.Vector.Unboxed as U
+#if __GLASGOW_HASKELL__ >= 704
+import Data.Monoid ((<>))
+#else
+import Data.Monoid
+
+(<>) :: Monoid m => m -> m -> m
+<> = mappend
+infixr 6 <>
+#endif
+
instance (Arbitrary a, U.Unbox a) => Arbitrary (U.Vector a) where
arbitrary = U.fromList <$> arbitrary
shrink = map U.fromList . shrink . U.toList
Please sign in to comment.
Something went wrong with that request. Please try again.