-- | Algebraic ring structure. Very similar to others found throughout hackage. -- -- TODO maybe use on of the already-written packages? module Biobase.Types.Ring where -- | Define the basic operations on a ring. class (Eq a, Ord a) => Ring a where (.+.), (.*.) :: a -> a -> a (.^.) :: a -> Int -> a (.^^.) :: a -> Double -> a neg :: a -> a one, zero :: a isZero :: a -> Bool -- ^ ==zero does not work well for min-plus infixl 6 .+. infixl 7 .*. infixr 8 .^. infixr 8 .^^.