Skip to content

Commit

Permalink
Remove redundant constraints GHC 8 will complain about
Browse files Browse the repository at this point in the history
also tested this still works with the older QuickCheck 2.6
  • Loading branch information
hvr committed Nov 28, 2015
1 parent fee7325 commit b1146d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Data/Ranged/RangedSet.hs
Expand Up @@ -249,7 +249,7 @@ rSetUnfold bound upperFunc succFunc = RSet $ normalise $ ranges1 bound

-- QuickCheck Generators

instance (Arbitrary v, DiscreteOrdered v, Show v) =>
instance (Arbitrary v, DiscreteOrdered v) =>
Arbitrary (RSet v)
where
arbitrary = frequency [
Expand All @@ -266,7 +266,7 @@ instance (Arbitrary v, DiscreteOrdered v, Show v) =>
rangeList (b1:b2:bs) = Range b1 b2 : rangeList bs
rangeList _ = []

instance (CoArbitrary v, DiscreteOrdered v, Show v) =>
instance (CoArbitrary v, DiscreteOrdered v) =>
CoArbitrary (RSet v)
where
coarbitrary (RSet ls) = variant (0 :: Int) . coarbitrary ls
Expand Down
4 changes: 2 additions & 2 deletions src/Data/Ranged/Ranges.hs
Expand Up @@ -215,7 +215,7 @@ rangeDifference r1@(Range lower1 upper1) (Range lower2 upper2) =

-- QuickCheck generators

instance (Arbitrary v, DiscreteOrdered v, Show v) =>
instance (Arbitrary v, DiscreteOrdered v) =>
Arbitrary (Range v) where

arbitrary = frequency [
Expand All @@ -234,7 +234,7 @@ instance (Arbitrary v, DiscreteOrdered v, Show v) =>
(1, return fullRange)
]

instance (CoArbitrary v, DiscreteOrdered v, Show v) =>
instance (CoArbitrary v, DiscreteOrdered v) =>
CoArbitrary (Range v) where

coarbitrary (Range lower upper) =
Expand Down

0 comments on commit b1146d9

Please sign in to comment.