Skip to content

Commit 80cde32

Browse files
committed
Fix comparable of PartialOrd (a,b) instance
1 parent 228fd3a commit 80cde32

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 2.1 (2022-12-27)
2+
3+
- Fix `comprable` for `PartialOrd (a,b)` instance
4+
15
# 2.0.3 (2021-10-30)
26

37
- Add instances for `Solo`

lattices.cabal

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
cabal-version: 1.18
22
name: lattices
3-
version: 2.0.3
4-
x-revision: 4
3+
version: 2.1
54
category: Math
65
license: BSD3
76
license-file: LICENSE

src/Algebra/PartialOrd.hs

-2
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ instance (PartialOrd a, PartialOrd b) => PartialOrd (a, b) where
148148
-- ordering is incompatible with the transitivity axiom we require for the derived partial order
149149
(x1, y1) `leq` (x2, y2) = x1 `leq` x2 && y1 `leq` y2
150150

151-
comparable (x1, y1) (x2, y2) = comparable x1 x2 && comparable y1 y2
152-
153151
-- | @since 2.0.1
154152
instance (PartialOrd a, PartialOrd b) => PartialOrd (Either a b) where
155153
Left x `leq` Left y = leq x y

test/Tests.hs

+2
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ tests = testGroup "Tests"
9595

9696
, allLatticeLaws LNotLattice (Proxy :: Proxy String)
9797

98+
, allLatticeLaws (LBounded Partial Modular) (Proxy :: Proxy (M2, M2))
99+
98100
, allLatticeLaws (LHeyting Total IsBoolean) (Proxy :: Proxy All)
99101
, allLatticeLaws (LHeyting Total IsBoolean) (Proxy :: Proxy Any)
100102
, allLatticeLaws (LHeyting Partial IsBoolean) (Proxy :: Proxy (Endo Bool)) -- note: it's partial!

0 commit comments

Comments
 (0)