hylolib-1.3.0: src/Data/Map/Arbitrary.hs
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.Map.Arbitrary
where
import Test.QuickCheck ( Arbitrary(..) )
import Control.Monad ( liftM )
import Data.Map ( Map )
import qualified Data.Map as Map
instance (Arbitrary k, Arbitrary v, Ord k) => Arbitrary (Map k v) where
arbitrary = Map.fromList `liftM` arbitrary
coarbitrary = coarbitrary . Map.toList