We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfd8711 commit 0c7ea0aCopy full SHA for 0c7ea0a
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