module Numeric.Algebra.Semiring
( Semiring,
)
where
import Data.Complex (Complex)
import Data.Int (Int16, Int32, Int64, Int8)
import Data.Kind (Constraint, Type)
import Data.Ratio (Ratio)
import Data.Word (Word16, Word32, Word64, Word8)
import Numeric.Algebra.Additive.AMonoid (AMonoid)
import Numeric.Algebra.Multiplicative.MMonoid (MMonoid)
import Numeric.Natural (Natural)
type Semiring :: Type -> Constraint
class (AMonoid r, MMonoid r) => Semiring r
instance Semiring Double
instance Semiring Float
instance Semiring Int
instance Semiring Int8
instance Semiring Int16
instance Semiring Int32
instance Semiring Int64
instance Semiring Integer
instance Semiring Natural
instance Semiring Word
instance Semiring Word8
instance Semiring Word16
instance Semiring Word32
instance Semiring Word64
instance Semiring (Ratio Integer)
instance Semiring (Ratio Natural)
instance (RealFloat a) => Semiring (Complex a)