projects
/
haskell-directory.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2002-12-18 10:45:31 by malcolm]
[haskell-directory.git]
/
Data
/
Ratio.hs
diff --git
a/Data/Ratio.hs
b/Data/Ratio.hs
index
8a5b55f
..
14e5f65
100644
(file)
--- a/
Data/Ratio.hs
+++ b/
Data/Ratio.hs
@@
-43,6
+43,10
@@
import GHC.Real -- The basic defns for Ratio
import Hugs.Prelude(Ratio(..), (%), numerator, denominator)
#endif
import Hugs.Prelude(Ratio(..), (%), numerator, denominator)
#endif
+#ifdef __NHC__
+import Ratio (Ratio(..), (%), numerator, denominator, approxRational)
+#else
+
-- -----------------------------------------------------------------------------
-- approxRational
-- -----------------------------------------------------------------------------
-- approxRational
@@
-80,3
+84,4
@@
approxRational rat eps = simplest (rat-eps) (rat+eps)
nd'' = simplest' d' r' d r
n'' = numerator nd''
d'' = denominator nd''
nd'' = simplest' d' r' d r
n'' = numerator nd''
d'' = denominator nd''
+#endif