semilattices 0.0.0.5 → 0.0.0.6
raw patch · 4 files changed
+16/−5 lines, 4 filesdep +hashablePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: hashable
API changes (from Hackage documentation)
- Data.Semilattice.Join: instance (GHC.Classes.Eq k, Data.Semilattice.Join.Join a) => Data.Semilattice.Join.Join (Data.HashMap.Internal.HashMap k a)
- Data.Semilattice.Join: instance GHC.Classes.Eq a => Data.Semilattice.Join.Join (Data.HashSet.Internal.HashSet a)
- Data.Semilattice.Meet: instance (GHC.Classes.Eq k, Data.Semilattice.Meet.Meet a) => Data.Semilattice.Meet.Meet (Data.HashMap.Internal.HashMap k a)
- Data.Semilattice.Meet: instance GHC.Classes.Eq a => Data.Semilattice.Meet.Meet (Data.HashSet.Internal.HashSet a)
+ Data.Semilattice.Join: instance (GHC.Classes.Eq a, Data.Hashable.Class.Hashable a) => Data.Semilattice.Join.Join (Data.HashSet.Internal.HashSet a)
+ Data.Semilattice.Join: instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k, Data.Semilattice.Join.Join a) => Data.Semilattice.Join.Join (Data.HashMap.Internal.HashMap k a)
+ Data.Semilattice.Meet: instance (GHC.Classes.Eq a, Data.Hashable.Class.Hashable a) => Data.Semilattice.Meet.Meet (Data.HashSet.Internal.HashSet a)
+ Data.Semilattice.Meet: instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k, Data.Semilattice.Meet.Meet a) => Data.Semilattice.Meet.Meet (Data.HashMap.Internal.HashMap k a)
Files
- ChangeLog.md +5/−0
- semilattices.cabal +5/−1
- src/Data/Semilattice/Join.hs +3/−2
- src/Data/Semilattice/Meet.hs +3/−2
ChangeLog.md view
@@ -1,3 +1,8 @@+# 0.0.0.6++Fix broken builds on GHC <= 9.2.++ # 0.0.0.5 Support more recent GHCs, remove some redundant constraints, and obviate the need for the dependency on `hashable`.
semilattices.cabal view
@@ -1,5 +1,5 @@ name: semilattices-version: 0.0.0.5+version: 0.0.0.6 synopsis: Semilattices description: Join- and meet-semilattices, with optional upper and lower bounds, and a variety of instances for each. homepage: https://github.com/robrix/semilattices@@ -35,6 +35,7 @@ build-depends: base >=4.9 && <5 , containers >=0.5 && <0.7+ , hashable >=1.2 && <1.5 , unordered-containers >=0.2 && <0.3 hs-source-dirs: src default-language: Haskell2010@@ -57,6 +58,9 @@ ghc-options: -Wno-missing-safe-haskell-mode if (impl(ghc >= 9.2)) ghc-options: -Wno-missing-kind-signatures+ -- recent unordered-containers versions don't require Hashable for unionWith.+ if (impl(ghc >= 9.4))+ ghc-options: -Wno-redundant-constraints test-suite doctests type: exitcode-stdio-1.0
src/Data/Semilattice/Join.hs view
@@ -6,6 +6,7 @@ , LessThan(..) ) where +import Data.Hashable import Data.HashMap.Lazy as HashMap import Data.HashSet as HashSet import Data.IntMap as IntMap@@ -268,7 +269,7 @@ -- Identity: -- -- prop> lowerBound \/ a == (a :: HashMap Char (Set Char))-instance (Eq k, Join a) => Join (HashMap k a) where+instance (Eq k, Hashable k, Join a) => Join (HashMap k a) where (\/) = HashMap.unionWith (\/) -- | HashSet union forms a semilattice.@@ -288,7 +289,7 @@ -- Identity: -- -- prop> lowerBound \/ a == (a :: HashSet Char)-instance Eq a => Join (HashSet a) where+instance (Eq a, Hashable a) => Join (HashSet a) where (\/) = HashSet.union
src/Data/Semilattice/Meet.hs view
@@ -6,6 +6,7 @@ , GreaterThan(..) ) where +import Data.Hashable import Data.HashMap.Lazy as HashMap import Data.HashSet as HashSet import Data.IntMap as IntMap@@ -268,7 +269,7 @@ -- Absorption: -- -- prop> lowerBound /\ a == (lowerBound :: HashMap Char (Set Char))-instance (Eq k, Meet a) => Meet (HashMap k a) where+instance (Eq k, Hashable k, Meet a) => Meet (HashMap k a) where (/\) = HashMap.intersectionWith (/\) -- | HashSet intersection forms a semilattice.@@ -288,7 +289,7 @@ -- Absorption: -- -- prop> lowerBound /\ a == (lowerBound :: HashSet Char)-instance Eq a => Meet (HashSet a) where+instance (Eq a, Hashable a) => Meet (HashSet a) where (/\) = HashSet.intersection