MagicHaskeller-0.9.6.7: Automatic inductive functional programmer by systematic search

# Documentation

data Ratio a Source #

Constructors

 !Integer :% !Integer

Instances

 Integral a => Enum (Ratio a) Source # Methodssucc :: Ratio a -> Ratio a #pred :: Ratio a -> Ratio a #toEnum :: Int -> Ratio a #fromEnum :: Ratio a -> Int #enumFrom :: Ratio a -> [Ratio a] #enumFromThen :: Ratio a -> Ratio a -> [Ratio a] #enumFromTo :: Ratio a -> Ratio a -> [Ratio a] #enumFromThenTo :: Ratio a -> Ratio a -> Ratio a -> [Ratio a] # Eq (Ratio a) Source # Methods(==) :: Ratio a -> Ratio a -> Bool #(/=) :: Ratio a -> Ratio a -> Bool # Integral a => Fractional (Ratio a) Source # Methods(/) :: Ratio a -> Ratio a -> Ratio a #recip :: Ratio a -> Ratio a # Integral a => Num (Ratio a) Source # Methods(+) :: Ratio a -> Ratio a -> Ratio a #(-) :: Ratio a -> Ratio a -> Ratio a #(*) :: Ratio a -> Ratio a -> Ratio a #negate :: Ratio a -> Ratio a #abs :: Ratio a -> Ratio a #signum :: Ratio a -> Ratio a # Ord (Ratio a) Source # Methodscompare :: Ratio a -> Ratio a -> Ordering #(<) :: Ratio a -> Ratio a -> Bool #(<=) :: Ratio a -> Ratio a -> Bool #(>) :: Ratio a -> Ratio a -> Bool #(>=) :: Ratio a -> Ratio a -> Bool #max :: Ratio a -> Ratio a -> Ratio a #min :: Ratio a -> Ratio a -> Ratio a # Integral a => Real (Ratio a) Source # MethodstoRational :: Ratio a -> Rational # Integral a => RealFrac (Ratio a) Source # MethodsproperFraction :: Integral b => Ratio a -> (b, Ratio a) #truncate :: Integral b => Ratio a -> b #round :: Integral b => Ratio a -> b #ceiling :: Integral b => Ratio a -> b #floor :: Integral b => Ratio a -> b # (Show a, Integral a) => Show (Ratio a) Source # MethodsshowsPrec :: Int -> Ratio a -> ShowS #show :: Ratio a -> String #showList :: [Ratio a] -> ShowS # (NearEq i, Integral i) => NearEq (Ratio i) Source # Methods(~=) :: Ratio i -> Ratio i -> Bool Source # (Integral i, Random i, Show i) => ShowArbitrary (Ratio i) Source # MethodsshowArbitraries :: [(AnnShowS, Ratio i)] Source #

(%) :: Integral a => a -> a -> Ratio a Source #