semirings-0.1.3.0: two monoids as one, in holy haskimony
Data.Star
Synopsis
class Semiring a => Star a where #
A Star semiring adds one operation, star to a Semiring, such that it follows the law:
star
Semiring
star x = one + x * star x = one + star x * x
one
+
*
Another operation, aplus, can be defined in terms of star:
aplus
aplus x = x * star x
Minimal complete definition
star | aplus
Methods
star :: a -> a #
aplus :: a -> a #
Instances
star :: Bool -> Bool #
aplus :: Bool -> Bool #
star :: () -> () #
aplus :: () -> () #
star :: Endo a -> Endo a #
aplus :: Endo a -> Endo a #
star :: (a -> b) -> a -> b #
aplus :: (a -> b) -> a -> b #