-------------------------------------
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)
| isDigit c -> cont (TKrational r) rest'
where ((r,rest'):_) = readFloat (digits ++ ('.':c:rest))
-- When reading a floating-point number, which is
| 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
(digits,rest) -> cont (TKinteger (sgn * (read digits))) rest
lexName cont cstr cs = cont (cstr name) rest