packages feed

lattices 1.0 → 1.1

raw patch · 2 files changed

+23/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Algebra.Lattice: instance (JoinSemiLattice v) => BoundedJoinSemiLattice (IntMap v)
+ Algebra.Lattice: instance (JoinSemiLattice v) => JoinSemiLattice (IntMap v)
+ Algebra.Lattice: instance BoundedJoinSemiLattice IntSet
+ Algebra.Lattice: instance JoinSemiLattice IntSet

Files

Algebra/Lattice.hs view
@@ -17,7 +17,9 @@ import Algebra.PartialOrd  import qualified Data.Set as S+import qualified Data.IntSet as IS import qualified Data.Map as M+import qualified Data.IntMap as IM   -- | A algebraic structure with element joins: <http://en.wikipedia.org/wiki/Semilattice>@@ -104,6 +106,16 @@ instance (Ord a, Enumerable a) => BoundedLattice (S.Set (Enumerated a)) where  --+-- IntSets+--++instance JoinSemiLattice IS.IntSet where+    join = IS.union++instance BoundedJoinSemiLattice IS.IntSet where+    bottom = IS.empty++-- -- Maps -- @@ -122,6 +134,16 @@     top = M.fromList (universe `zip` repeat top)  instance (Ord k, Enumerable k, BoundedLattice v) => BoundedLattice (M.Map (Enumerated k) v) where++--+-- IntMaps+--++instance JoinSemiLattice v => JoinSemiLattice (IM.IntMap v) where+    join = IM.unionWith join++instance JoinSemiLattice v => BoundedJoinSemiLattice (IM.IntMap v) where+    bottom = IM.empty  -- -- Functions
lattices.cabal view
@@ -1,5 +1,5 @@ Name:               lattices-Version:            1.0+Version:            1.1 Cabal-Version:      >= 1.2 Category:           Math Synopsis:           Fine-grained library for constructing and manipulating lattices