Commit 575853e3 authored by simonpj's avatar simonpj
Browse files

[project @ 2001-09-26 16:27:04 by simonpj]

Wibble
parent 1b2bd7df
% ------------------------------------------------------------------------------
% $Id: PrelReal.lhs,v 1.15 2001/09/26 16:22:04 simonpj Exp $
% $Id: PrelReal.lhs,v 1.16 2001/09/26 16:27:04 simonpj Exp $
%
% (c) The University of Glasgow, 1994-2000
%
......@@ -62,7 +62,7 @@ their greatest common divisor.
\begin{code}
reduce :: (Integral a) => a -> a -> Ratio a
{#- SPECIALISE reduce :: Integer -> Integer -> Rational #-}
{-# SPECIALISE reduce :: Integer -> Integer -> Rational #-}
reduce _ 0 = error "Ratio.%: zero denominator"
reduce x y = (x `quot` d) :% (y `quot` d)
where d = gcd x y
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment