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