We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ca9b46 commit 058ee44Copy full SHA for 058ee44
discrimination-ieee754/discrimination-ieee754.cabal
@@ -34,7 +34,7 @@ library
34
base >=4.10 && <4.17
35
, contravariant >=1.3 && <1.6
36
, data-binary-ieee754 ==0.4.*
37
- , discrimination >=0.3 && <0.5
+ , discrimination >=0.3 && <0.6
38
default-language: Haskell2010
39
40
test-suite test
@@ -49,7 +49,7 @@ test-suite test
49
, base >=4.10 && <4.17
50
51
52
53
, discrimination-ieee754
54
, test-framework
55
, test-framework-quickcheck2 ==0.3.*
discrimination-ieee754/package.yaml
@@ -15,7 +15,7 @@ dependencies:
15
- base >= 4.10 && < 4.17
16
- data-binary-ieee754 >= 0.4 && < 0.5
17
- contravariant >= 1.3 && < 1.6
18
- - discrimination >= 0.3 && < 0.5
+ - discrimination >= 0.3 && < 0.6
19
20
library:
21
source-dirs: src
proto-lens-discrimination/package.yaml
@@ -26,7 +26,7 @@ dependencies:
26
- bytestring >= 0.10 && < 0.12
27
28
- containers >= 0.5 && < 0.7
29
30
- discrimination-ieee754 == 0.1.*
31
- lens-family >= 1.2 && < 2.2
32
- proto-lens >= 0.6 && < 0.8
proto-lens-discrimination/proto-lens-discrimination.cabal
@@ -48,7 +48,7 @@ library
48
, bytestring >=0.10 && <0.12
, containers >=0.5 && <0.7
, discrimination-ieee754 ==0.1.*
, lens-family >=1.2 && <2.2
, proto-lens >=0.6 && <0.8
@@ -80,7 +80,7 @@ test-suite discrimination_test
80
81
82
83
84
85
86
proto-lens-discrimination/src/Data/ProtoLens/Group.hs
@@ -50,13 +50,14 @@ import Data.ProtoLens.Discrimination
-- Used internally to adapt 'groupingEq' to protobuf types without adding an
-- orphan instance for Grouping.
newtype MessageGrouping a = MessageGrouping { getMessageGrouping :: a }
-instance Message a => Grouping (MessageGrouping a) where
+ deriving Eq
+instance (Message a, Eq a) => Grouping (MessageGrouping a) where
grouping = getMessageGrouping >$< groupingMessage
56
57
-- | Check whether two protobufs are equal according to their Message instance.
58
--
59
-- This should be equivalent to the generated @Eq@ instances.
-eqMessage :: Message a => a -> a -> Bool
60
+eqMessage :: (Message a, Eq a) => a -> a -> Bool
61
eqMessage x y = groupingEq (MessageGrouping x) (MessageGrouping y)
62
63
-- | Group protobuf message values according to their Message instance.
proto-lens-discrimination/src/Data/ProtoLens/Sort.hs
@@ -54,13 +54,14 @@ import Data.ProtoLens.Group (groupingMessage)
-- Used to adapt 'sortingCompare' to protobuf types without adding an orphan
-- instance for Sorting.
newtype MessageSorting a = MessageSorting { getMessageSorting :: a }
-instance Message a => Grouping (MessageSorting a) where
+ deriving (Eq, Ord)
+instance (Message a, Eq a) => Grouping (MessageSorting a) where
grouping = getMessageSorting >$< groupingMessage
-instance Message a => Sorting (MessageSorting a) where
+instance (Message a, Ord a) => Sorting (MessageSorting a) where
sorting = getMessageSorting >$< sortingMessage
-- | Compare protobuf message values according to their Message instance.
-compareMessage :: Message a => a -> a -> Ordering
64
+compareMessage :: (Message a, Ord a) => a -> a -> Ordering
65
compareMessage x y = sortingCompare (MessageSorting x) (MessageSorting y)
66
67
-- | Sort protobuf message values according to their Message instance.
stack-9.2.yaml
@@ -4,7 +4,7 @@
4
# license that can be found in the LICENSE file or at
5
# https://developers.google.com/open-source/licenses/bsd
6
7
-resolver: nightly-2022-04-04
+resolver: nightly-2022-06-18
8
compiler: ghc-9.2.2
9
10
packages:
0 commit comments