There is no notion of defining a separate plus and times, as Multiplicative and Additive both inherit from Semigroup and Magma and so only have a single <> operation defined on them.
I propose we rename Additive -> Monoid and make Multiplicative use a new operator for the times operation. We can alias <+> to <> as in the Haskell Semiring package.
Since <.> can't be defined in Swift (what's used in Haskell's Semiring) and <*> is apply, maybe we use <**>?
With the current definition of
Semiring
, that is:There is no notion of defining a separate
plus
andtimes
, asMultiplicative
andAdditive
both inherit fromSemigroup
andMagma
and so only have a single<>
operation defined on them.I propose we rename
Additive
->Monoid
and makeMultiplicative
use a new operator for thetimes
operation. We can alias<+>
to<>
as in the Haskell Semiring package. Since<.>
can't be defined in Swift (what's used in Haskell's Semiring) and<*>
is apply, maybe we use<**>
?