+{-# OPTIONS -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
--
-- Module : Numeric
--- Copyright : (c) The University of Glasgow 2001
+-- Copyright : (c) The University of Glasgow 2002
-- License : BSD-style (see the file libraries/core/LICENSE)
--
-- Maintainer : libraries@haskell.org
--- Stability : experimental
+-- Stability : provisional
-- Portability : portable
--
--- $Id: Numeric.hs,v 1.2 2001/08/02 13:30:36 simonmar Exp $
+-- $Id: Numeric.hs,v 1.5 2002/02/12 10:52:18 simonmar Exp $
--
-- Odds and ends, mostly functions for reading and showing
-- RealFloat-like kind of values.
fromRat, -- :: (RealFloat a) => Rational -> a
showSigned, -- :: (Real a) => (a -> ShowS) -> Int -> a -> ShowS
readSigned, -- :: (Real a) => ReadS a -> ReadS a
- showInt, -- :: Integral a => a -> ShowS
+
readInt, -- :: (Integral a) => a -> (Char -> Bool)
-- -> (Char -> Int) -> ReadS a
-
readDec, -- :: (Integral a) => ReadS a
readOct, -- :: (Integral a) => ReadS a
readHex, -- :: (Integral a) => ReadS a
-{- -- left out for now, as we can only export the H98 interface
+ showInt, -- :: Integral a => a -> ShowS
+ showIntAtBase, -- :: Integral a => a -> (a -> Char) -> a -> ShowS
showHex, -- :: Integral a => a -> ShowS
showOct, -- :: Integral a => a -> ShowS
showBin, -- :: Integral a => a -> ShowS
--}
-
+
showEFloat, -- :: (RealFloat a) => Maybe Int -> a -> ShowS
showFFloat, -- :: (RealFloat a) => Maybe Int -> a -> ShowS
showGFloat, -- :: (RealFloat a) => Maybe Int -> a -> ShowS
showFloat, -- :: (RealFloat a) => a -> ShowS
readFloat, -- :: (RealFloat a) => ReadS a
-
floatToDigits, -- :: (RealFloat a) => Integer -> a -> ([Int], Int)
lexDigits, -- :: ReadS String
-{- -- left out for now, as we can only export the H98 interface
- -- general purpose number->string converter.
- showIntAtBase, -- :: Integral a
- -- => a -- base
- -- -> (a -> Char) -- digit to char
- -- -> a -- number to show.
- -- -> ShowS
--}
) where
-import Prelude -- For dependencies
import Data.Char
#ifdef __GLASGOW_HASKELL__
-import GHC.Base ( Char(..), unsafeChr )
+import GHC.Base
import GHC.Read
-import GHC.Real ( showSigned )
+import GHC.Real
import GHC.Float
+import GHC.Num
+import GHC.Show
+import Data.Maybe
#endif
#ifdef __HUGS__