diff options
Diffstat (limited to 'Hash.hs')
-rw-r--r-- | Hash.hs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -56,12 +56,15 @@ instance Hashable Signature where hash (OtherSignature s) = hash $ Tagged "OtherSignature" s instance Hashable PublicKey where - hash (PublicKey v gpgsig) = hash $ Tagged "PublicKey" - [hash v, hash gpgsig] + hash (PublicKey v) = hash $ Tagged "PublicKey" v instance Hashable GpgSig where hash (GpgSig v) = hash $ Tagged "GpgSig" v +instance Hashable a => Hashable (PerhapsSigned a) where + hash (GpgSigned a sig) = hash $ Tagged "GpgSigned" [hash a, hash sig] + hash (UnSigned a) = hash $ Tagged "UnSigned" a + instance Hashable ElapsedTime where hash (ElapsedTime n) = hash $ Tagged "ElapsedTime" $ C8.pack $ show n |