module Numeric.Algebra.Ring
( Ring,
)
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.AGroup (AGroup)
import Numeric.Algebra.Multiplicative.MMonoid (MMonoid)
import Numeric.Algebra.Semiring (Semiring)
type Ring :: Type -> Constraint
class (AGroup r, MMonoid r, Semiring r) => Ring r
instance Ring Double
instance Ring Float
instance Ring Int
instance Ring Int8
instance Ring Int16
instance Ring Int32
instance Ring Int64
instance Ring Integer
instance Ring Word
instance Ring Word8
instance Ring Word16
instance Ring Word32
instance Ring Word64
instance Ring (Ratio Integer)
instance (RealFloat a) => Ring (Complex a)