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