[project @ 2003-02-05 11:41:26 by simonpj]
authorsimonpj <unknown>
Wed, 5 Feb 2003 11:41:26 +0000 (11:41 +0000)
committersimonpj <unknown>
Wed, 5 Feb 2003 11:41:26 +0000 (11:41 +0000)
-------------------------------------
  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

index 93c7d1f..04e1060 100644 (file)
@@ -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