
#13211: NegativeLiterals -0.0 :: Double -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Nolan Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Nolan): I faced with a problem. There's a test BinaryLiterals0 which breaks after my patch. Problem is that before the patch expressions like `(,) -0b0` were valid because `-0` was single lexeme. Patch changed this behavior for zeroes and now `-` is distinct lexeme if followed by zero literal. I see 3 of ways of dealing with that fail. 1) Remove this test. Which doesn't look like a good idea for me though. 2) Change lexer such that `-0` is single lexeme but `-0.0` is two distinct ones. The test should pass. But think of this. `id -0.0` is now legal code but after such change it will fail. So I think this is not good solution as well. 3) To come up with another way of solving this issue that will not break those tests. 4) Consider this is not bug but a feature. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13211#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler