From: simonpj Date: Thu, 10 Jul 2003 08:12:04 +0000 (+0000) Subject: [project @ 2003-07-10 08:12:04 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~698 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=7d22905b1deb6a5064fb236c469809aaf895e823;hp=522f819c8ad0c16f799f4199b4eee9d1d97902c6 [project @ 2003-07-10 08:12:04 by simonpj] External Core was ignore sign on rational --- diff --git a/ghc/compiler/parser/LexCore.hs b/ghc/compiler/parser/LexCore.hs index d634acd..1a545a3 100644 --- a/ghc/compiler/parser/LexCore.hs +++ b/ghc/compiler/parser/LexCore.hs @@ -66,7 +66,7 @@ lexNum cont cs = where f sgn cs = case span isDigit cs of (digits,'.':c:rest) - | isDigit c -> cont (TKrational r) rest' + | 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