packages feed

hashable-orphans 0 → 0.1

raw patch · 3 files changed

+9/−17 lines, 3 filesdep +time-compatdep −timePVP ok

version bump matches the API change (PVP)

Dependencies added: time-compat

Dependencies removed: time

API changes (from Hackage documentation)

- Data.Hashable.Orphans: instance Data.Hashable.Class.Hashable Data.Time.Clock.Scale.DiffTime
- Data.Hashable.Orphans: instance Data.Hashable.Class.Hashable Data.Time.Clock.UTC.UTCTime

Files

ChangeLog.md view
@@ -1,4 +1,6 @@ # Revision history for hashable-orphans+## 0.1  -- YYYY-mm-dd+* Reuse time instances from time-compat, still exist for SortedList though.  ## 0  -- YYYY-mm-dd 
hashable-orphans.cabal view
@@ -1,11 +1,10 @@--- Initial hashable-orphans.cabal generated by cabal init.  For further --- documentation, see http://haskell.org/cabal/users-guide/+cabal-version:       3.0  name:                hashable-orphans-version:             0+version:             0.1 synopsis:            Provides instances missing from Hashable. homepage:            https://oss.xkcd.com/-license:             BSD3+license:             BSD-3-Clause license-file:        LICENSE author:              davean maintainer:          oss@xkcd.com@@ -13,7 +12,6 @@ category:            Data build-type:          Simple extra-source-files:  ChangeLog.md-cabal-version:       >=1.10 description:         This package provides instances missing from <http://hackage.haskell.org/package/hashable hashable>, specificly ones for types from <http://hackage.haskell.org/package/time time> ('DiffTime', 'UTCTime') and <http://hackage.haskell.org/package/sorted-list sorted-list> at present.  source-repository head@@ -26,9 +24,8 @@   exposed-modules:         Data.Hashable.Orphans        build-depends:-        base >=4.9 && <4.11-      , hashable >= 1.2 && < 1.3+        base >=4.9 && <4.18+      , hashable >= 1.2 && < 1.5       , sorted-list >= 0.2 && < 0.3-      , time >= 1.6 && < 1.9+      , time-compat ^>= 1.9 -      
src/Data/Hashable/Orphans.hs view
@@ -3,14 +3,7 @@ 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)+import Data.Time.Clock.Compat  instance Hashable a => Hashable (SortedList a) where   hashWithSalt s = hashWithSalt s . toList