From 8b90646791f16015f067e4654a069f64d8aeacb4 Mon Sep 17 00:00:00 2001
From: simonmar <unknown>
Date: Mon, 13 Mar 2000 11:32:20 +0000
Subject: [PATCH] [project @ 2000-03-13 11:32:20 by simonmar] Disable the stuff
 that was supposed to lex octal & hexadecimal literals, but which didn't work.
  The code in the Haskell report doesn't attempt to lex these either.

---
 ghc/lib/std/PrelRead.lhs | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/ghc/lib/std/PrelRead.lhs b/ghc/lib/std/PrelRead.lhs
index ad3fe8161c57..c096e80becac 100644
--- a/ghc/lib/std/PrelRead.lhs
+++ b/ghc/lib/std/PrelRead.lhs
@@ -175,6 +175,8 @@ lex (c:s) | isSingle c = return ([c],s)
 		(nam,t) <- return (span isIdChar s)
 		return (c:nam, t)
           | isDigit c  = do
+{- Removed, 13/03/2000 by SDM.
+   Doesn't work, and not required by Haskell report.
 	         let
 		  (pred, s', isDec) =
 		    case s of
@@ -183,9 +185,9 @@ lex (c:s) | isSingle c = return ([c],s)
 		      ('x':rs) -> (isHexDigit, rs, False)
 		      ('X':rs) -> (isHexDigit, rs, False)
 		      _	       -> (isDigit, s, True)
-
-		 (ds,s)  <- return (span pred s')
-		 (fe,t)  <- lexFracExp isDec s
+-}
+		 (ds,s)  <- return (span isDigit s)
+		 (fe,t)  <- lexFracExp s
 		 return (c:ds++fe,t)
           | otherwise  = mzero    -- bad character
              where
@@ -193,11 +195,11 @@ lex (c:s) | isSingle c = return ([c],s)
               isSym c    =  c `elem` "!@#$%&*+./<=>?\\^|:-~"
               isIdChar c =  isAlphaNum c || c `elem` "_'"
 
-              lexFracExp True ('.':cs)   = do
+              lexFracExp ('.':c:cs) | isDigit c = do
 			(ds,t) <- lex0Digits cs
 			(e,u)  <- lexExp t
-			return ('.':ds++e,u)
-              lexFracExp _ s        = return ("",s)
+			return ('.':c:ds++e,u)
+              lexFracExp s        = return ("",s)
 
               lexExp (e:s) | e `elem` "eE" = 
 	          (do
-- 
GitLab