[project @ 2002-12-18 10:45:31 by malcolm]
[haskell-directory.git] / Data / Ratio.hs
index d71551e..14e5f65 100644 (file)
@@ -2,14 +2,12 @@
 -- |
 -- Module      :  Data.Ratio
 -- Copyright   :  (c) The University of Glasgow 2001
--- License     :  BSD-style (see the file libraries/core/LICENSE)
+-- License     :  BSD-style (see the file libraries/base/LICENSE)
 -- 
 -- Maintainer  :  libraries@haskell.org
 -- Stability   :  provisional
 -- Portability :  portable
 --
--- $Id: Ratio.hs,v 1.2 2002/04/24 16:31:40 simonmar Exp $
---
 -- Standard functions on rational numbers
 --
 -----------------------------------------------------------------------------
@@ -41,6 +39,14 @@ import Prelude
 import GHC.Real                -- The basic defns for Ratio
 #endif
 
+#ifdef __HUGS__
+import Hugs.Prelude(Ratio(..), (%), numerator, denominator)
+#endif
+
+#ifdef __NHC__
+import Ratio (Ratio(..), (%), numerator, denominator, approxRational)
+#else
+
 -- -----------------------------------------------------------------------------
 -- approxRational
 
@@ -78,4 +84,4 @@ approxRational rat eps        =  simplest (rat-eps) (rat+eps)
                                           nd''       =  simplest' d' r' d r
                                           n''        =  numerator nd''
                                           d''        =  denominator nd''
-
+#endif