X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FRead.lhs;h=6a23d6107d944f122ade3d6e788ec38c20b20b8e;hb=f0b63670508b9e9069e5e7873f90da758a0290d0;hp=a8240c60f11456c32240de5c4460207451ffd403;hpb=faa2f4ea42a9c81f9cb902ea815068c1041fe3c1;p=ghc-base.git diff --git a/GHC/Read.lhs b/GHC/Read.lhs index a8240c6..6a23d61 100644 --- a/GHC/Read.lhs +++ b/GHC/Read.lhs @@ -1,5 +1,5 @@ % ------------------------------------------------------------------------------ -% $Id: Read.lhs,v 1.5 2002/04/13 05:08:55 sof Exp $ +% $Id: Read.lhs,v 1.6 2002/04/13 14:59:06 panne Exp $ % % (c) The University of Glasgow, 1994-2000 % @@ -168,8 +168,9 @@ read s = either error id (readEither s) -- H98 compatibility lex :: ReadS String -- As defined by H98 -lex = readP_to_S (do { lexeme <- L.lex ; - return (show lexeme) }) +lex "" = [("","")] -- ugly hack +lex s = readP_to_S (do { lexeme <- L.lex ; + return (show lexeme) }) s lexLitChar :: ReadS String -- As defined by H98 lexLitChar = readP_to_S (do { lexeme <- L.lexLitChar ;