module Graphics.Text.Font.Choose.StrSet(StrSet(..), module S) where
import Data.Set (Set)
import qualified Data.Set as S
import Data.MessagePack (MessagePack(..))
import Test.QuickCheck (Arbitrary(..))
newtype StrSet = StrSet { unStrSet :: Set String } deriving (Eq, Show, Read)
instance MessagePack StrSet where
toObject = toObject . S.toList . unStrSet
fromObject msg = StrSet <$> S.fromList <$> fromObject msg
instance Arbitrary StrSet where
arbitrary = StrSet <$> arbitrary