module Flat.Instances.Unordered
()
where
import Flat.Instances.Mono
import Flat.Instances.Util
import Data.HashSet
import Data.Hashable
import qualified Data.HashMap.Strict as MS
instance (Hashable a, Eq a,Flat a) => Flat (HashSet a) where
size :: HashSet a -> NumBits -> NumBits
size = HashSet a -> NumBits -> NumBits
forall set. (IsSet set, Flat (Element set)) => Size set
sizeSet
encode :: HashSet a -> Encoding
encode = HashSet a -> Encoding
forall set. (IsSet set, Flat (Element set)) => set -> Encoding
encodeSet
decode :: Get (HashSet a)
decode = Get (HashSet a)
forall set. (IsSet set, Flat (Element set)) => Get set
decodeSet
instance (Hashable k,Eq k,Flat k,Flat v) => Flat (MS.HashMap k v) where
size :: HashMap k v -> NumBits -> NumBits
size = HashMap k v -> NumBits -> NumBits
forall r.
(Flat (ContainerKey r), Flat (MapValue r), IsMap r) =>
Size r
sizeMap
encode :: HashMap k v -> Encoding
encode = HashMap k v -> Encoding
forall map.
(Flat (ContainerKey map), Flat (MapValue map), IsMap map) =>
map -> Encoding
encodeMap
decode :: Get (HashMap k v)
decode = Get (HashMap k v)
forall map.
(Flat (ContainerKey map), Flat (MapValue map), IsMap map) =>
Get map
decodeMap