instant-hashable-0.2: Generic Hashable instances through instant-generics

Safe HaskellSafe-Inferred
LanguageHaskell2010

Generics.Instant.Functions.Hashable

Contents

Synopsis

Documentation

You can use ghashWithSaltDefault as your generic hashWithSalt for any Representable type as follows:

instance Hashable MyType where hashWithSalt = ghashWithSaltDefault

class (Representable a, GHashable (Rep a)) => RepGHashable a Source

RepGHashable is simply a synonym for (Representable a, GHashable (Rep a)) with the convenient kind (* -> Constraint)

Instances

Internals

class GHashable a where Source

Methods

ghashWithSalt :: Int -> a -> Int Source

Instances

GHashable Z 
GHashable U 
Hashable a => GHashable (Var a) 
Hashable a => GHashable (Rec a) 
(GHashable a, GHashable b) => GHashable ((:+:) a b) 
(GHashable a, GHashable b) => GHashable ((:*:) a b) 
GHashable a => GHashable (CEq k k c p q a)