blob: 7c8107f35fb301347faa35b5db5b27bdba714253 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
%
% (c) The AQUA Project, Glasgow University, 1994-1999
%
\section[Ratio]{Module @Ratio@}
Standard functions on rational numbers
\begin{code}
{-# OPTIONS -fno-implicit-prelude #-}
module Ratio
( Ratio
, Rational
, (%) -- :: (Integral a) => a -> a -> Ratio a
, numerator -- :: (Integral a) => Ratio a -> a
, denominator -- :: (Integral a) => Ratio a -> a
, approxRational -- :: (RealFrac a) => a -> a -> Rational
-- Ratio instances:
-- (Integral a) => Eq (Ratio a)
-- (Integral a) => Ord (Ratio a)
-- (Integral a) => Num (Ratio a)
-- (Integral a) => Real (Ratio a)
-- (Integral a) => Fractional (Ratio a)
-- (Integral a) => RealFrac (Ratio a)
-- (Integral a) => Enum (Ratio a)
-- (Read a, Integral a) => Read (Ratio a)
-- (Integral a) => Show (Ratio a)
--
-- Implementation checked wrt. Haskell 98 lib report, 1/99.
) where
import PrelNum
import PrelNumExtra
\end{code}
|