hashable-1.4.1.0: A class for types that can be converted to a hash value
LicenseBSD-3-Clause
Stabilityprovisional
PortabilityGHC >= 7.4
Safe HaskellSafe
LanguageHaskell2010

Data.Hashable.Generic

Description

Hashable support for GHC generics.

Since: 1.3.0.0

Synopsis

Implementation using Generics.

genericHashWithSalt :: (Generic a, GHashable Zero (Rep a)) => Int -> a -> Int Source #

Generic hashWithSalt.

Since: 1.3.0.0

genericLiftHashWithSalt :: (Generic1 t, GHashable One (Rep1 t)) => (Int -> a -> Int) -> Int -> t a -> Int Source #

Generic liftHashWithSalt.

Since: 1.3.0.0

Constraints

class GHashable arity f where Source #

The class of types that can be generically hashed.

Methods

ghashWithSalt :: HashArgs arity a -> Int -> f a -> Int Source #

Instances

Instances details
GHashable One Par1 Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs One a -> Int -> Par1 a -> Int Source #

GHashable arity (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs arity a -> Int -> U1 a -> Int Source #

GHashable arity (V1 :: Type -> Type) Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs arity a -> Int -> V1 a -> Int Source #

Hashable1 f => GHashable One (Rec1 f) Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs One a -> Int -> Rec1 f a -> Int Source #

(GSum arity a, GSum arity b) => GHashable arity (a :+: b) Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs arity a0 -> Int -> (a :+: b) a0 -> Int Source #

Hashable a => GHashable arity (K1 i a :: Type -> Type) Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs arity a0 -> Int -> K1 i a a0 -> Int Source #

(GHashable arity a, GHashable arity b) => GHashable arity (a :*: b) Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs arity a0 -> Int -> (a :*: b) a0 -> Int Source #

GHashable arity a => GHashable arity (M1 i c a) Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs arity a0 -> Int -> M1 i c a a0 -> Int Source #

(Hashable1 f, GHashable One g) => GHashable One (f :.: g) Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs One a -> Int -> (f :.: g) a -> Int Source #

data One Source #

Instances

Instances details
GHashable One Par1 Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs One a -> Int -> Par1 a -> Int Source #

Hashable1 f => GHashable One (Rec1 f) Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs One a -> Int -> Rec1 f a -> Int Source #

(Hashable1 f, GHashable One g) => GHashable One (f :.: g) Source # 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

ghashWithSalt :: HashArgs One a -> Int -> (f :.: g) a -> Int Source #

newtype HashArgs One a Source # 
Instance details

Defined in Data.Hashable.Class

newtype HashArgs One a = HashArgs1 (Int -> a -> Int)

data Zero Source #

Instances

Instances details
data HashArgs Zero a Source # 
Instance details

Defined in Data.Hashable.Class

data family HashArgs arity a :: Type Source #

Instances

Instances details
newtype HashArgs One a Source # 
Instance details

Defined in Data.Hashable.Class

newtype HashArgs One a = HashArgs1 (Int -> a -> Int)
data HashArgs Zero a Source # 
Instance details

Defined in Data.Hashable.Class