X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Numeric.hs;fp=Numeric.hs;h=b21a98390e7bb524db4e5a71eecbf01641a1ebad;hb=2bdac8cfa0c4c01ce64db939ff2a77f16c57dfb5;hp=5603ae6c072c0e880a49c9147b35c7b6f1e036d5;hpb=57e487c332d1f428ee5ff85dbb32730d25a58235;p=ghc-base.git diff --git a/Numeric.hs b/Numeric.hs index 5603ae6..b21a983 100644 --- a/Numeric.hs +++ b/Numeric.hs @@ -30,7 +30,6 @@ module Numeric ( 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 @@ -155,23 +154,6 @@ showIntAtBase base toChr n r if n' == 0 then r' else showIntAtBase base toChr n' r' } -showHex :: Integral a => a -> ShowS -showHex n r = - showString "0x" $ - showIntAtBase 16 (toChrHex) n r - where - toChrHex d - | d < 10 = chr (ord '0' + fromIntegral d) - | otherwise = chr (ord 'a' + fromIntegral (d - 10)) - -showOct :: Integral a => a -> ShowS -showOct n r = - showString "0o" $ - showIntAtBase 8 (toChrOct) n r - where toChrOct d = chr (ord '0' + fromIntegral d) - -showBin :: Integral a => a -> ShowS -showBin n r = - showString "0b" $ - showIntAtBase 2 (toChrOct) n r - where toChrOct d = chr (ord '0' + fromIntegral d) +showHex, showOct :: Integral a => a -> ShowS +showHex = showIntAtBase 16 (intToDigit.fromIntegral) +showOct = showIntAtBase 8 (intToDigit.fromIntegral)