star-0.0.1.0: *-semirings

Safe HaskellSafe
LanguageHaskell2010

Data.Semiring

Documentation

class Semiring a where Source #

Minimal complete definition

plus, zero, times, one

Methods

plus Source #

Arguments

:: a 
-> a 
-> a

Additive Magma

zero Source #

Arguments

:: a

Additive Unital

times Source #

Arguments

:: a 
-> a 
-> a

Multiplicative Magma

one Source #

Arguments

:: a

Multiplicative Unital

Instances

Semiring Bool Source # 
Semiring Double Source # 
Semiring Float Source # 
Semiring Int Source # 

Methods

plus :: Int -> Int -> Int Source #

zero :: Int Source #

times :: Int -> Int -> Int Source #

one :: Int Source #

Semiring Int8 Source # 
Semiring Int16 Source # 
Semiring Int32 Source # 
Semiring Int64 Source # 
Semiring Word Source # 
Semiring Word8 Source # 
Semiring Word16 Source # 
Semiring Word32 Source # 
Semiring Word64 Source # 
Semiring () Source # 

Methods

plus :: () -> () -> () Source #

zero :: () Source #

times :: () -> () -> () Source #

one :: () Source #

Semiring a => Semiring [a] Source # 

Methods

plus :: [a] -> [a] -> [a] Source #

zero :: [a] Source #

times :: [a] -> [a] -> [a] Source #

one :: [a] Source #

Semiring b => Semiring (a -> b) Source # 

Methods

plus :: (a -> b) -> (a -> b) -> a -> b Source #

zero :: a -> b Source #

times :: (a -> b) -> (a -> b) -> a -> b Source #

one :: a -> b Source #

(Semiring a, Semiring b) => Semiring (a, b) Source # 

Methods

plus :: (a, b) -> (a, b) -> (a, b) Source #

zero :: (a, b) Source #

times :: (a, b) -> (a, b) -> (a, b) Source #

one :: (a, b) Source #

(Semiring a, Semiring b, Semiring c) => Semiring (a, b, c) Source # 

Methods

plus :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

zero :: (a, b, c) Source #

times :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

one :: (a, b, c) Source #

(Semiring a, Semiring b, Semiring c, Semiring d) => Semiring (a, b, c, d) Source # 

Methods

plus :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

zero :: (a, b, c, d) Source #

times :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

one :: (a, b, c, d) Source #

(Semiring a, Semiring b, Semiring c, Semiring d, Semiring e) => Semiring (a, b, c, d, e) Source # 

Methods

plus :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

zero :: (a, b, c, d, e) Source #

times :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

one :: (a, b, c, d, e) Source #

(Semiring a, Semiring b, Semiring c, Semiring d, Semiring e, Semiring f) => Semiring (a, b, c, d, e, f) Source # 

Methods

plus :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

zero :: (a, b, c, d, e, f) Source #

times :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

one :: (a, b, c, d, e, f) Source #

(Semiring a, Semiring b, Semiring c, Semiring d, Semiring e, Semiring f, Semiring g) => Semiring (a, b, c, d, e, f, g) Source # 

Methods

plus :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

zero :: (a, b, c, d, e, f, g) Source #

times :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

one :: (a, b, c, d, e, f, g) Source #

(Semiring a, Semiring b, Semiring c, Semiring d, Semiring e, Semiring f, Semiring g, Semiring h) => Semiring (a, b, c, d, e, f, g, h) Source # 

Methods

plus :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) Source #

zero :: (a, b, c, d, e, f, g, h) Source #

times :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) Source #

one :: (a, b, c, d, e, f, g, h) Source #

(Semiring a, Semiring b, Semiring c, Semiring d, Semiring e, Semiring f, Semiring g, Semiring h, Semiring i) => Semiring (a, b, c, d, e, f, g, h, i) Source # 

Methods

plus :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) Source #

zero :: (a, b, c, d, e, f, g, h, i) Source #

times :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) Source #

one :: (a, b, c, d, e, f, g, h, i) Source #

(Semiring a, Semiring b, Semiring c, Semiring d, Semiring e, Semiring f, Semiring g, Semiring h, Semiring i, Semiring j) => Semiring (a, b, c, d, e, f, g, h, i, j) Source # 

Methods

plus :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) Source #

zero :: (a, b, c, d, e, f, g, h, i, j) Source #

times :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) Source #

one :: (a, b, c, d, e, f, g, h, i, j) Source #