From: simonpj Date: Tue, 1 Apr 2003 16:32:04 +0000 (+0000) Subject: [project @ 2003-04-01 16:32:04 by simonpj] X-Git-Tag: nhc98-1-18-release~706 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=a4f224d21064d2a816966f0812f58714a0fc464e;p=ghc-base.git [project @ 2003-04-01 16:32:04 by simonpj] Fix bogus implementation of readLitChar, lexLitChar --- 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)