18 lines
340 B
Haskell
18 lines
340 B
Haskell
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
|
|
|
module Data.HashSet.Instances
|
|
(
|
|
) where
|
|
|
|
import ClassyPrelude
|
|
|
|
import Data.HashSet (HashSet)
|
|
import qualified Data.HashSet as HashSet
|
|
|
|
import Data.Binary (Binary(..))
|
|
|
|
|
|
instance (Binary a, Hashable a, Eq a) => Binary (HashSet a) where
|
|
get = HashSet.fromList <$> get
|
|
put = put . HashSet.toList
|