Copyright  (c) Henning Thielemann 20112012 (c) Dylan Thurston 2006 

Maintainer  numericprelude@henningthielemann.de 
Stability  provisional 
Portability  portable (?) 
Safe Haskell  SafeInferred 
Language  Haskell98 
Ratios of mathematical objects.
 data T a = (:%) {
 numerator :: !a
 denominator :: !a
 (%) :: C a => a > a > T a
 type Rational = T Integer
 fromValue :: C a => a > T a
 recip :: (C a, C a) => T a > T a
 scale :: C a => a > T a > T a
 split :: C a => T a > (a, T a)
 showsPrecAuto :: (Eq a, C a, Show a) => Int > T a > String > String
 toRational98 :: Integral a => T a > Ratio a
Documentation
(:%)  

C a => C Integer (T a)  
Eq a => Eq (T a)  
Integral a => Fractional (T a)  
Integral a => Num (T a)  
(Ord a, C a) => Ord (T a)  
(Read a, C a) => Read (T a)  
(Show a, C a) => Show (T a)  
(Arbitrary a, C a, C a) => Arbitrary (T a)  
(Storable a, C a) => Storable (T a)  
(Random a, C a, C a) => Random (T a)  
(Ord a, C a) => C (T a)  
C a => C (T a)  
(C a, C a) => C (T a)  
C a => C (T a)  
(C a, C a) => C (T a)  
C a => C (T a)  
(C a, C a) => C (T a)  
(C a, C a) => C (T a)  
(C a, C a) => C (T a)  
(Ord a, C a) => C (T a)  
C a => C (T a) (T a)  
C a => C (T a) (T a)  
C a => C (T a) (T a)  
(C a, C a) => Sqr (T a) (T a)  
(C a, C a, C a) => C (T a) (T a)  
(C a, C a) => C (T a) (T a) 
showsPrecAuto :: (Eq a, C a, Show a) => Int > T a > String > String Source
This is an alternative show method that is more userfriendly but also potentially more ambigious.
toRational98 :: Integral a => T a > Ratio a Source
Necessary when mixing NumericPrelude.Numeric Rationals with Prelude98 Rationals