Blame test-suite/Orphans.hs

Packit 785658
{-# OPTIONS_GHC -fno-warn-orphans #-}
Packit 785658
module Orphans () where
Packit 785658
Packit 785658
import Numeric.Natural (Natural)
Packit 785658
import Test.QuickCheck (Arbitrary (..))
Packit 785658
Packit 785658
-- | The QuickCheck-2.10 doesn't define the Arbitrary Natural instance
Packit 785658
-- We define own instance (and not use quickcheck-instance) to break
Packit 785658
-- the cycle in tests.
Packit 785658
instance Arbitrary Natural where
Packit 785658
    arbitrary = fmap (fromInteger . abs) arbitrary
Packit 785658
    shrink = map (fromInteger . abs) . shrink . fromIntegral