semirings-0.2.1.1: two monoids as one, in holy haskimony

Safe HaskellNone
LanguageHaskell98

Data.Star

Synopsis

Documentation

class Semiring a => Star a where #

A Star semiring adds one operation, star to a Semiring, such that it follows the law:

star x = one + x * star x = one + star x * x

Another operation, aplus, can be defined in terms of star:

aplus x = x * star x

Minimal complete definition

star | aplus

Methods

star :: a -> a #

aplus :: a -> a #

Instances
Star Bool # 
Instance details

Defined in Data.Star

Methods

star :: Bool -> Bool #

aplus :: Bool -> Bool #

Star () # 
Instance details

Defined in Data.Star

Methods

star :: () -> () #

aplus :: () -> () #

Star b => Star (a -> b) # 
Instance details

Defined in Data.Star

Methods

star :: (a -> b) -> a -> b #

aplus :: (a -> b) -> a -> b #

Star (Proxy a) # 
Instance details

Defined in Data.Star

Methods

star :: Proxy a -> Proxy a #

aplus :: Proxy a -> Proxy a #