Two more bugs, both of which I was able to fix (patches attached): - MkExternalCore.lhs didn't properly handle character literals greater than 0xff. It would generate code that contained something like (1010101::Char), which made no sense. I changed it to use type Int instead of Char for these literals.
- LexCore.hs ignored the sign of floating-point literals (so if a program contained -1.0, it would be parsed as 1.0). I fixed it. -- Kirsten Chevalier * [EMAIL PROTECTED] * Often in error, never in doubt
Index: LexCore.hs =================================================================== RCS file: /cvs/fptools/ghc/compiler/parser/LexCore.hs,v retrieving revision 1.6 diff -r1.6 LexCore.hs 69c69 < | isDigit c -> cont (TKrational r) rest' --- > | isDigit c -> cont (TKrational ((fromInteger sgn) * r)) rest'
Index: MkExternalCore.lhs =================================================================== RCS file: /cvs/fptools/ghc/compiler/coreSyn/MkExternalCore.lhs,v retrieving revision 1.20 diff -r1.20 MkExternalCore.lhs 166,167c166,167 < MachChar i | i <= 0xff -> C.Lchar (chr i) t < MachChar i | otherwise -> C.Lint (toEnum i) t --- > MachChar i | i <= 0xff -> C.Lchar (chr i) t > MachChar i | otherwise -> C.Lint (toEnum i) (make_ty (literalType (MachInt > (toInteger i))))