@@ -24,27 +24,28 @@ import GHC.Generics
24
24
-- | An 'Additive' 'Semigroup' is one where (<>) is commutative
25
25
class Semigroup q => Additive q where
26
26
27
- -- | Trivial group .
27
+ -- | Trivial additive semigroup .
28
28
instance Additive ()
29
29
30
- -- | Product group. A Pair of groups gives rise to a group
30
+ -- | Product additive semigroup.
31
+ -- A Pair of additive semigroups gives rise to a additive semigroup
31
32
instance (Additive a , Additive b ) => Additive (a , b )
32
33
33
34
-- See https://gitlab.haskell.org/ghc/ghc/issues/11135#note_111802 for the reason Compose is not also provided.
34
35
-- Base does not define Monoid (Compose f g a) so this is the best we can
35
36
-- really do for functor composition.
36
37
instance Additive (f (g a )) => Additive ((f :.: g ) a )
37
38
38
- -- | Product of groups , Functor style.
39
+ -- | Product of additive semigroups , Functor style.
39
40
instance (Additive (f a ), Additive (g a )) => Additive ((f :*: g ) a )
40
41
41
- -- | Trivial group , Functor style
42
+ -- | Trivial additive semigroup , Functor style
42
43
instance Additive (Proxy x )
43
44
44
- -- | Const lifts groups into a functor.
45
+ -- | Const lifts additive semigroups into a functor.
45
46
instance Additive a => Additive (Const a x )
46
- -- | Ideitnty lifts groups pointwise (at only one point)
47
+ -- | Ideitnty lifts additive semigroups pointwise (at only one point)
47
48
instance Additive a => Additive (Identity a )
48
49
49
- -- | Functions lift groups pointwise.
50
+ -- | Functions lift additive semigroups pointwise.
50
51
instance Additive b => Additive (a -> b )
0 commit comments