[project @ 2003-04-17 15:17:07 by simonpj]
authorsimonpj <unknown>
Thu, 17 Apr 2003 15:17:12 +0000 (15:17 +0000)
committersimonpj <unknown>
Thu, 17 Apr 2003 15:17:12 +0000 (15:17 +0000)
Comments and imports

GHC/Read.lhs
Text/ParserCombinators/ReadPrec.hs
Text/Read/Lex.hs

index 5f15a0f..38a2ccf 100644 (file)
@@ -50,7 +50,6 @@ import qualified Text.ParserCombinators.ReadP as P
 import Text.ParserCombinators.ReadP
   ( ReadP
   , readP_to_S
-  , readS_to_P
   )
 
 import qualified Text.Read.Lex as L
index 50cef1e..77cd61e 100644 (file)
@@ -55,7 +55,6 @@ import qualified Text.ParserCombinators.ReadP as ReadP
   , look
   , (+++)
   , pfail
-  , choice
   )
 
 import Control.Monad( MonadPlus(..) )
index 2706177..dd26cb1 100644 (file)
@@ -33,24 +33,17 @@ import Text.ParserCombinators.ReadP
 
 import GHC.Base
 import GHC.Num( Num(..), Integer )
-import GHC.Show( Show(.. ), showChar, showString,
-                isSpace, isAlpha, isAlphaNum,
-                isOctDigit, isHexDigit, toUpper )
-import GHC.Real( Ratio(..), Integral, Rational, (%), fromIntegral, fromRational, 
+import GHC.Show( Show(.. ), isSpace, isAlpha, isAlphaNum )
+import GHC.Real( Ratio(..), Integral, Rational, (%), fromIntegral, 
                 toInteger, (^), (^^), infinity, notANumber )
-import GHC.Float( Float, Double )
 import GHC.List
-import GHC.Show( ShowS, shows )
-import GHC.Enum( minBound, maxBound )
+import GHC.Enum( maxBound )
 import Data.Maybe
-import Data.Either
 import Control.Monad
 
 -- -----------------------------------------------------------------------------
 -- Lexing types
 
-type LexP = ReadP Lexeme
-
 data Lexeme
   = Char   Char                -- Quotes removed, 
   | String String      --      escapes interpreted
@@ -294,10 +287,6 @@ lexString =
 type Base   = Int
 type Digits = [Int]
 
-showDigit :: Int -> ShowS
-showDigit n | n <= 9    = shows n
-            | otherwise = showChar (chr (n + ord 'A' - 10))
-
 lexNumber :: ReadP Lexeme
 lexNumber 
   = lexHexOct  <++     -- First try for hex or octal 0x, 0o etc