From bce7298b759859db11b0fb648cdfed22f826e132 Mon Sep 17 00:00:00 2001 From: simonpj Date: Wed, 5 Feb 2003 11:41:26 +0000 Subject: [PATCH] [project @ 2003-02-05 11:41:26 by simonpj] ------------------------------------- Fix parsing of floating-point constants in External Core ------------------------------------- This fix accidentally made it into the previous (unrelated) commit, so it's really the *previous* change to LexCore you should look at. The fix updates LexCore so that it can parse literals in scientific notation (e.g. 4.3e-3) --- ghc/compiler/parser/LexCore.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc/compiler/parser/LexCore.hs b/ghc/compiler/parser/LexCore.hs index 93c7d1f..04e1060 100644 --- a/ghc/compiler/parser/LexCore.hs +++ b/ghc/compiler/parser/LexCore.hs @@ -69,7 +69,7 @@ lexNum cont cs = | isDigit c -> cont (TKrational r) rest' where ((r,rest'):_) = readFloat (digits ++ ('.':c:rest)) -- When reading a floating-point number, which is - -- a bit comlicated, use the Haskell 98 library function + -- a bit complicated, use the Haskell 98 library function (digits,rest) -> cont (TKinteger (sgn * (read digits))) rest lexName cont cstr cs = cont (cstr name) rest -- 1.7.10.4