[project @ 2003-11-26 09:55:22 by simonmar]
[haskell-directory.git] / Data / Ratio.hs
index 37dd821..5c9c953 100644 (file)
@@ -5,7 +5,7 @@
 -- License     :  BSD-style (see the file libraries/base/LICENSE)
 -- 
 -- Maintainer  :  libraries@haskell.org
--- Stability   :  provisional
+-- Stability   :  stable
 -- Portability :  portable
 --
 -- Standard functions on rational numbers
@@ -39,7 +39,14 @@ import Prelude
 import GHC.Real                -- The basic defns for Ratio
 #endif
 
-#ifndef __HUGS__
+#ifdef __HUGS__
+import Hugs.Prelude(Ratio(..), (%), numerator, denominator)
+#endif
+
+#ifdef __NHC__
+import Ratio (Ratio(..), (%), numerator, denominator, approxRational)
+#else
+
 -- -----------------------------------------------------------------------------
 -- approxRational
 
@@ -77,4 +84,4 @@ approxRational rat eps        =  simplest (rat-eps) (rat+eps)
                                           nd''       =  simplest' d' r' d r
                                           n''        =  numerator nd''
                                           d''        =  denominator nd''
-#endif  /* __HUGS__ */
+#endif