X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FLexCore.hs;h=68b341916395ff7e2f657545baecab0d2c5424ea;hp=c3e133966fe2ac8014529e9bbdd13348faf32a58;hb=6f66d02c9654fc037db0582857acdcc15e0fd1d3;hpb=1eb76d715ef78e2576ad8daa8dd981d23e6c51ed diff --git a/compiler/parser/LexCore.hs b/compiler/parser/LexCore.hs index c3e1339..68b3419 100644 --- a/compiler/parser/LexCore.hs +++ b/compiler/parser/LexCore.hs @@ -3,7 +3,7 @@ module LexCore where import ParserCoreUtils import Panic -import Char +import Data.Char import Numeric isNameChar :: Char -> Bool @@ -86,7 +86,8 @@ lexNum cont cs = | isDigit c -> cont (TKrational (fromInteger sgn * r)) rest' where ((r,rest'):_) = readFloat (digits ++ ('.':c:rest)) -- When reading a floating-point number, which is - -- a bit complicated, use the Haskell 98 library function + -- a bit complicated, use the standard library function + -- "readFloat" (digits,rest) -> cont (TKinteger (sgn * (read digits))) rest lexName :: (a -> String -> b) -> (String -> a) -> String -> b