We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 070b6eb + 0c7ea0a commit 677d671Copy full SHA for 677d671
src/Data/Ring.purs
@@ -15,10 +15,11 @@ import Type.Data.RowList (RLProxy(..))
15
-- | The `Ring` class is for types that support addition, multiplication,
16
-- | and subtraction operations.
17
-- |
18
--- | Instances must satisfy the following law in addition to the `Semiring`
+-- | Instances must satisfy the following laws in addition to the `Semiring`
19
-- | laws:
20
21
--- | - Additive inverse: `a - a = (zero - a) + a = zero`
+-- | - Additive inverse: `a - a = zero`
22
+-- | - Compatibility of `sub` and `negate`: `a - b = a + (zero - b)`
23
class Semiring a <= Ring a where
24
sub :: a -> a -> a
25
0 commit comments