module Plankton.Ring
( Semiring
, Ring
, CRing
) where
import Data.Complex (Complex(..))
import Plankton.Additive
import Plankton.Distribution
import Plankton.Multiplicative
import Protolude (Bool(..), Double, Float, Int, Integer)
class (MultiplicativeAssociative a, MultiplicativeUnital a, Distribution a) =>
Semiring a
instance Semiring Double
instance Semiring Float
instance Semiring Int
instance Semiring Integer
instance Semiring Bool
instance (AdditiveGroup a, Semiring a) => Semiring (Complex a)
class ( AdditiveGroup a
, MultiplicativeAssociative a
, MultiplicativeUnital a
, Distribution a
) =>
Ring a
instance Ring Double
instance Ring Float
instance Ring Int
instance Ring Integer
instance (Ring a) => Ring (Complex a)
class (Multiplicative a, Ring a) =>
CRing a
instance CRing Double
instance CRing Float
instance CRing Int
instance CRing Integer
instance (CRing a) => CRing (Complex a)