From a7fdfabc5f9d97b2cbcd6fe80b70f0b2d1d0db95 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 17 Apr 2003 15:17:12 +0000 Subject: [PATCH] [project @ 2003-04-17 15:17:07 by simonpj] Comments and imports --- GHC/Read.lhs | 1 - Text/ParserCombinators/ReadPrec.hs | 1 - Text/Read/Lex.hs | 17 +++-------------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/GHC/Read.lhs b/GHC/Read.lhs index 5f15a0f..38a2ccf 100644 --- a/GHC/Read.lhs +++ b/GHC/Read.lhs @@ -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 diff --git a/Text/ParserCombinators/ReadPrec.hs b/Text/ParserCombinators/ReadPrec.hs index 50cef1e..77cd61e 100644 --- a/Text/ParserCombinators/ReadPrec.hs +++ b/Text/ParserCombinators/ReadPrec.hs @@ -55,7 +55,6 @@ import qualified Text.ParserCombinators.ReadP as ReadP , look , (+++) , pfail - , choice ) import Control.Monad( MonadPlus(..) ) diff --git a/Text/Read/Lex.hs b/Text/Read/Lex.hs index 2706177..dd26cb1 100644 --- a/Text/Read/Lex.hs +++ b/Text/Read/Lex.hs @@ -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 -- 1.7.10.4