{-# OPTIONS_GHC -fno-warn-orphans #-} module Data.Set.Arbitrary where import Data.Set( Set ) import qualified Data.Set as Set import Control.Applicative ( (<$>) ) import Test.QuickCheck ( Arbitrary(..) ) instance (Arbitrary a, Ord a) => Arbitrary (Set a) where arbitrary = Set.fromList <$> arbitrary coarbitrary = coarbitrary . Set.toList