From a4f224d21064d2a816966f0812f58714a0fc464e Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 1 Apr 2003 16:32:04 +0000 Subject: [PATCH] [project @ 2003-04-01 16:32:04 by simonpj] Fix bogus implementation of readLitChar, lexLitChar --- GHC/Read.lhs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GHC/Read.lhs b/GHC/Read.lhs index 17a9d81..5f15a0f 100644 --- a/GHC/Read.lhs +++ b/GHC/Read.lhs @@ -158,13 +158,13 @@ lex :: ReadS String -- As defined by H98 lex s = readP_to_S L.hsLex s lexLitChar :: ReadS String -- As defined by H98 -lexLitChar = readP_to_S (do { P.skipSpaces ; - (s, L.Char _) <- P.gather L.lex ; +lexLitChar = readP_to_S (do { (s, _) <- P.gather L.lexChar ; return s }) + -- There was a skipSpaces before the P.gather L.lexChar, + -- but that seems inconsistent with readLitChar readLitChar :: ReadS Char -- As defined by H98 -readLitChar = readP_to_S (do { L.Char c <- L.lex ; - return c }) +readLitChar = readP_to_S L.lexChar lexDigits :: ReadS String lexDigits = readP_to_S (P.munch1 isDigit) -- 1.7.10.4