Skip to content

Commit

Permalink
Fix build error with QuickCheck 2.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bos committed Jan 22, 2016
1 parent 63a7a43 commit 8f2b8a5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/Instances.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@ import Data.Time (ZonedTime(..), LocalTime(..), TimeZone(..),
NominalDiffTime)
import Data.Version
import qualified Data.Text as T
import qualified Data.Map as Map
import Data.Text (Text)
import Data.Aeson.Types
import Control.Applicative
import Functions

#if !MIN_VERSION_QuickCheck(2,8,2)
import qualified Data.Map as Map

instance (Ord k, Arbitrary k, Arbitrary v) => Arbitrary (Map.Map k v) where
arbitrary = Map.fromList <$> arbitrary
#endif

-- "System" types.

instance Arbitrary Text where
arbitrary = T.pack <$> arbitrary

instance (Ord k, Arbitrary k, Arbitrary v) => Arbitrary (Map.Map k v) where
arbitrary = Map.fromList <$> arbitrary

instance Arbitrary TimeOfDay where
arbitrary = do
h <- choose (0, 23)
Expand Down

0 comments on commit 8f2b8a5

Please sign in to comment.