module Data.Hashable.Orphans () where

import Data.Hashable (Hashable(hashWithSalt))
import Data.Foldable
import Data.SortedList
import Data.Time

instance Hashable DiffTime where
  hashWithSalt s = hashWithSalt s . diffTimeToPicoseconds

instance Hashable UTCTime where
  hashWithSalt s (UTCTime (ModifiedJulianDay d) dt) =
    hashWithSalt s (d, dt)

instance Hashable a => Hashable (SortedList a) where
  hashWithSalt s = hashWithSalt s . toList