Skip to content

Commit

Permalink
GHC 7.2 compatibility
Browse files Browse the repository at this point in the history
--HG--
extra : amend_source : 6eaa96f11b7e5d106435ef50b6b1ab519d21fffe
  • Loading branch information
bos committed Sep 11, 2013
1 parent f028c02 commit 92a2aa6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/Properties.hs
@@ -1,17 +1,27 @@
{-# 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)
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
Expand Down

0 comments on commit 92a2aa6

Please sign in to comment.